-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed some data files in libxamarin-app.so
#9367
Open
grendello
wants to merge
49
commits into
main
Choose a base branch
from
dev/grendel/embed-binaries-in-xamarinapp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
4681cbc
Embed some data files in `libxamarin-app.so`
grendello 3f53146
Use llvm-mc to embed the binary, this way we have full control
grendello a117cac
Runtime config binary blob is now fully embedded
grendello eabdee5
Remove debug spam
grendello daa654c
New target to build embedded assembly store
grendello 70c7b74
New task to build embedded assembly store
grendello 070e60b
Move some of assembly packaging code to a helper class
grendello d34cffc
Move more assembly packaging code to the helper class
grendello 623d7bd
Almost there, TBC
grendello 87a1297
Assembly store embedding works
grendello c3dcb75
Actually use the embedded assembly store
grendello a6a0e2b
A handful of bugfixes and performance tweaks
grendello 17e8d3e
Fix DSO count when building
grendello fad0c8b
Don't allocate memory for ZIP Central Directory data
grendello 2e2fde6
Experimenting with zip scanning performance
grendello 88dc31e
Post rebase fixups
grendello 492fb28
More post rebase fixups
grendello 4848efb
seek and ye shall read
grendello b1a3863
Details, details...
grendello 2941030
Cleanup
grendello d69c5d6
Teach assembly store explorer about embedded stores
grendello bde06ac
Teach store v2 reader to look in `libxamarin-app.so`, too
grendello 94a09e3
Nicer
grendello 4607b6f
The runtime configuration blob is now part of `libxamarin-app.so`
grendello 872f662
Optionally produce "empty" embed.*.s files
grendello 26bf693
Don't embed assembly store when fastdev is used
grendello ea9d5b2
Let's see if designer tests pass now
grendello 6aebe30
Expect the unexpected, DTB doesn't specify any ABIs
grendello 56f030d
[WIP] Builds but doesn't work
grendello fb0e6e2
Let's see how it works now
grendello 9e4b3fe
Always generate embedded store sources in CreateEmbeddedAssemblyStore
grendello 581991e
Let's see...
grendello 3a46110
Don't assume assemblies exist
grendello 81726be
better
grendello a84b663
Update apkdesc files
grendello 1035cdd
Load embedded assembly store also in filesystem mode
grendello d46e20f
Log it when an assembly is missing in ManifestDocument
grendello d14811c
Add some debug logging
grendello 3648ab1
Don't throw
grendello 4acc5a2
Always create the destination directory
grendello a7095d2
Post-rebase fixups
grendello 4031e9b
Let's see what's in the override dir listing
grendello 836c4b4
Let's see
grendello f4f1502
Cleanup
grendello 8e41bdd
Address feedback
grendello bc47870
Let's see what breaks
grendello 8dfab2e
Revert "Let's see what breaks"
grendello 66179bc
Restore [Require]
grendello c584dbd
Remove comment, no longer valid
grendello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...id.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AssemblyStores.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<UsingTask TaskName="Xamarin.Android.Tasks.CreateEmbeddedAssemblyStore" AssemblyFile="$(_XamarinAndroidBuildTasksAssembly)" /> | ||
<UsingTask TaskName="Xamarin.Android.Tasks.PrepareAbiItems" AssemblyFile="$(_XamarinAndroidBuildTasksAssembly)" /> | ||
|
||
<Target Name="_PrepareCreateEmbeddedAssemblyStoreOutputItems"> | ||
<PrepareAbiItems | ||
BuildTargetAbis="@(_BuildTargetAbis)" | ||
NativeSourcesDir="$(_NativeAssemblySourceDir)" | ||
Mode="EmbeddedAssemblyStore"> | ||
<Output TaskParameter="AssemblySources" ItemName="_EmbeddedAssemblyStoreSourceFiles" /> | ||
</PrepareAbiItems> | ||
|
||
<ItemGroup> | ||
<_CreateEmbeddedAssemblyStoreAssembly Include="@(_ShrunkUserAssemblies);@(_AndroidResolvedSatellitePaths);@(_ShrunkFrameworkAssemblies)"/> | ||
<_CreateEmbeddedAssemblyStoreAssembly Condition=" '@(_CreateEmbeddedAssemblyStoreAssembly->Count())' == '0' " Include="@(_ResolvedUserAssemblies);@(_ResolvedFrameworkAssemblies);@(_AndroidResolvedSatellitePaths)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="_CreateEmbeddedAssemblyStore" | ||
DependsOnTargets="_PrepareCreateEmbeddedAssemblyStoreOutputItems" | ||
Inputs="@(_CreateEmbeddedAssemblyStoreAssembly)" | ||
Outputs="@(_EmbeddedAssemblyStoreSourceFiles)"> | ||
<CreateEmbeddedAssemblyStore | ||
AndroidBinUtilsDirectory="$(AndroidBinUtilsDirectory)" | ||
AppSharedLibrariesDir="$(_AndroidApplicationSharedLibraryPath)" | ||
AssemblySourcesDir="$(IntermediateOutputPath)android" | ||
AssemblyStoreEmbeddedInRuntime="$(_AndroidEmbedAssemblyStoreInRuntime)" | ||
CompressedAssembliesDir="$(_AndroidCompressedAssembliesDir)\test\" | ||
Debug="$(AndroidIncludeDebugSymbols)" | ||
EnableCompression="$(AndroidEnableAssemblyCompression)" | ||
ProjectFullPath="$(MSBuildProjectFullPath)" | ||
ResolvedUserAssemblies="@(_ShrunkUserAssemblies);@(_AndroidResolvedSatellitePaths)" | ||
ResolvedFrameworkAssemblies="@(_ShrunkFrameworkAssemblies)" | ||
SupportedAbis="@(_BuildTargetAbis)" /> | ||
|
||
<ItemGroup> | ||
<FileWrites Include="@(_EmbeddedAssemblyStoreSourceFiles)" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed? I didn't see anything in here that is trying to reorder MSBuild targets?
Maybe it's from before, trying to workaround the bug in #9452?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible, I don't remember exactly which test was affected by this change. I'll revert this bit and we'll see what (if anything) breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this revert work?