-
Notifications
You must be signed in to change notification settings - Fork 578
[CoreCLR] dlopen()-based assembly store loading #12033
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
Merged
jonathanpeppers
merged 16 commits into
main
from
dev/simonrozsival/dlopen-assembly-store
Jul 14, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
da3981c
[CoreCLR] Experimental: dlopen()-based assembly store loading
simonrozsival a399afd
[CoreCLR] Make configure_from_payload build the path lazily
simonrozsival 76e2862
code cleanup
simonrozsival f9d6226
[CoreCLR] Drop AssemblyStore::map_from_pointer; call configure_from_p…
simonrozsival f583404
[CoreCLR] Make dlopen the only assembly-store path; remove ZIP scanning
simonrozsival e76d854
[CoreCLR] dlopen the assembly store with RTLD_LOCAL
simonrozsival 4833d43
[CoreCLR] Fix assembly-store-reader compat, rename symbol, const-corr…
simonrozsival 5afb5fa
[CoreCLR] Remove now-dead DSOApkEntry / dso_apk_entries
simonrozsival 2ded5a4
[CoreCLR] Clarify configure_from_payload read-only comment
simonrozsival b05de75
[tests] Update CoreCLR APK size baseline
simonrozsival 537a2a3
[CoreCLR] Preserve FastDev without assembly store
simonrozsival 4864037
[docs] Document CoreCLR dlopen()-based assembly store loading
simonrozsival 794086c
Merge remote-tracking branch 'origin/main' into dev/simonrozsival/dlo…
simonrozsival 8716783
[CoreCLR] Clean up dlopen assembly-store wrappers between builds
simonrozsival 1ebd3eb
[CoreCLR] Fail fast if _AndroidDlopenAssemblyStore is overridden
simonrozsival 7358ceb
[CoreCLR] Align dlopen wrapper payload to the arch max page size
simonrozsival 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
45 changes: 45 additions & 0 deletions
45
...ks/Tests/Xamarin.Android.Build.Tests/Tasks/GenerateNativeApplicationConfigSourcesTests.cs
This file contains hidden or 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,45 @@ | ||
| #nullable enable | ||
| using System.IO; | ||
|
|
||
| using Microsoft.Build.Utilities; | ||
| using NUnit.Framework; | ||
| using Xamarin.Android.Tasks; | ||
| using Xamarin.ProjectTools; | ||
|
|
||
| namespace Xamarin.Android.Build.Tests.Tasks; | ||
|
|
||
| [TestFixture] | ||
| public class GenerateNativeApplicationConfigSourcesTests : BaseTest | ||
| { | ||
| [TestCase (false)] | ||
| [TestCase (true)] | ||
| public void HaveAssemblyStoreIsEmittedForCoreCLR (bool haveAssemblyStore) | ||
| { | ||
| string outputRoot = Path.Combine (Root, "temp", $"{nameof (HaveAssemblyStoreIsEmittedForCoreCLR)}-{haveAssemblyStore}"); | ||
| string monoAndroidPath = Path.Combine (TestEnvironment.MonoAndroidFrameworkDirectory, "Mono.Android.dll"); | ||
| FileAssert.Exists (monoAndroidPath); | ||
|
|
||
| var task = new GenerateNativeApplicationConfigSources { | ||
| BuildEngine = new MockBuildEngine (TestContext.Out), | ||
| ResolvedAssemblies = [new TaskItem (monoAndroidPath)], | ||
| EnvironmentOutputDirectory = Path.Combine (outputRoot, "android"), | ||
| SupportedAbis = ["arm64-v8a"], | ||
| AndroidPackageName = "com.microsoft.android.assemblystoretest", | ||
| EnablePreloadAssembliesDefault = false, | ||
| TargetsCLR = true, | ||
| AndroidRuntime = "CoreCLR", | ||
| UseAssemblyStore = haveAssemblyStore, | ||
| }; | ||
|
|
||
| Assert.IsTrue (task.Execute (), "GenerateNativeApplicationConfigSources should succeed."); | ||
|
|
||
| var environmentFiles = EnvironmentHelper.GatherEnvironmentFiles ( | ||
| outputRoot, | ||
| "arm64-v8a", | ||
| required: true, | ||
| runtime: AndroidRuntime.CoreCLR | ||
| ); | ||
| var config = (EnvironmentHelper.ApplicationConfig_CoreCLR)EnvironmentHelper.ReadApplicationConfig (environmentFiles, AndroidRuntime.CoreCLR); | ||
| Assert.AreEqual (haveAssemblyStore, config.have_assembly_store); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
Do we need to update some of the apps in the
toolsfolder?They can "unpack" an
.apk, can we file an issue to make them support any new formats we introduced?