-
Notifications
You must be signed in to change notification settings - Fork 534
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
CLR hosting #9572
base: main
Are you sure you want to change the base?
CLR hosting #9572
Conversation
cbc08f4
to
0370d7d
Compare
* Add a version script which hides all the symbols except for the handful we have to export. * Enable exceptions
In process to remove object instances for a slightly faster startup
Build is broken atm
c085352
to
13bbd93
Compare
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libmono-android.release.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.debug.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.debug.so" /> | ||
<_AndroidRuntimePackAssets Condition=" Exists('$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.release.so') " Include="$(MicrosoftAndroidSdkOutDir)lib\$(AndroidRID)\libnet-android.release.so" /> |
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.
I'm fixing this up in #9583, but maybe I can split up part of it into a smaller PR.
13bbd93
to
82cfb8a
Compare
* Add a version script which hides all the symbols except for the handful we have to export. * Enable exceptions
* main: [illink] consolidate & remove hardcoded assembly names (#9662) Bump to NuGet/NuGet.Client@aa7eb998 (#9682) [Microsoft.Android.Sdk.Analysis] fix global types (#9680)
@@ -216,5 +218,6 @@ | |||
<ItemGroup> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="Mono" /> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="NativeAOT" /> | |||
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="CoreCLR" /> |
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.
I couldn't figure out if we should case it CoreClr
or CoreCLR
:
- https://grep.app/search?q=CoreCLR&case=true&filter[repo][0]=dotnet/runtime
- https://grep.app/search?q=CoreClr&case=true&filter[repo][0]=dotnet/runtime
I found both, so we can probably decide which we prefer?
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.
I like CoreCLR better, since CLR is an acronym
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' " Include="libnet-android.debug" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' " Include="libnet-android.release" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'CoreCLR' " Include="libmono-android.debug" /> | ||
<_ExcludedNativeLibraries Condition=" '$(AndroidRuntime)' == 'CoreCLR' " Include="libmono-android.release" /> |
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.
So, $(AndroidRuntime)
isn't defined for customer's project builds. I think it would always be blank?
Right now, we only have these:
$(UseMonoRuntime)=true
$(_AndroidNativeAot)=true
Maybe we need to figure out what property xamarin/xamarin-macios uses to identify CoreCLR? You can use it for macOS, to choose between Mono & CoreCLR.
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.
Yeah, it would always be blank now and I think we should always expect a value in there. The macios way looks fine.
<_AndroidUseCLR Condition=" '$(AndroidRuntime)' == 'CoreCLR' ">True</_AndroidUseCLR> | ||
<_AndroidUseCLR Condition=" '$(AndroidRuntime)' != 'CoreCLR' ">False</_AndroidUseCLR> |
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.
$(AndroidRuntime)
is probably always blank in customer's Android projects, but is this the property to select a runtime? Should the property be in DefaultProperties.targets
?
Maybe we should align with xamarin/xamarin-macios?
Ok, here is what we should do for MSBuild properties for now:
We could remove |
I like |
Context: #9572 (comment) Context: https://github.com/xamarin/xamarin-macios/blob/2009c571aa8a975ab0e0b1785e5484dbd64d6f9b/dotnet/targets/Xamarin.Shared.Sdk.targets#L1004-L1006 To align with xamarin/xamarin-macios, the following public MSBuild properties can be used to select a runtime for iOS, macOS, etc.: * `$(UseMonoRuntime)=true`: MonoVM * `$(UseMonoRuntime)=false`: CoreCLR * `$(PublishAot)=true`: NativeAOT * Defaults if blank, select MonoVM Introduce a private `$(_AndroidRuntime)` property we can use throughout our build to know which runtime is being targetted. This way, if a new property is designed in the future, we can keep using `$(_AndroidRuntime)` and simply update the defaults.
…#9686) Context: #9572 (comment) Context: https://github.com/xamarin/xamarin-macios/blob/2009c571aa8a975ab0e0b1785e5484dbd64d6f9b/dotnet/targets/Xamarin.Shared.Sdk.targets#L1004-L1006 To align with xamarin/xamarin-macios, the following public MSBuild properties can be used to select a runtime for iOS, macOS, etc.: * `$(UseMonoRuntime)=true`: MonoVM * `$(UseMonoRuntime)=false`: CoreCLR * `$(PublishAot)=true`: NativeAOT * Defaults if blank, select MonoVM Introduce a private `$(_AndroidRuntime)` property we can use throughout our build to know which runtime is being targeted. This way, if a new property is designed in the future, we can keep using `$(_AndroidRuntime)` and simply update the defaults.
Some of those changes will stay, most will go. Makes it possible to move foreward for now without having CoreCLR packs for all the targets. Only arm64 supported atm
* main: [Xamarin.Android.Build.Tasks] introduce `$(_AndroidRuntime)` property (#9686)
This time to include the actual CoreCLR Android runtime in the apk
* main: Bump to dotnet/java-interop@9b1d878 (#9694) Bump to dotnet/sdk@aca4b810e2 10.0.100-alpha.1.25069.2 (#9696)
No description provided.