Skip to content
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

Draft
wants to merge 103 commits into
base: main
Choose a base branch
from
Draft

CLR hosting #9572

wants to merge 103 commits into from

Conversation

grendello
Copy link
Contributor

@grendello grendello commented Dec 2, 2024

No description provided.

@grendello grendello force-pushed the dev/grendel/clr-host branch from cbc08f4 to 0370d7d Compare December 3, 2024 12:41
@grendello grendello force-pushed the dev/grendel/clr-host branch 2 times, most recently from c085352 to 13bbd93 Compare December 3, 2024 21:15
Comment on lines 42 to 45
<_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" />
Copy link
Member

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.

@grendello grendello force-pushed the dev/grendel/clr-host branch from 13bbd93 to 82cfb8a Compare December 4, 2024 18:47
  * Add a version script which hides all the symbols except for the
    handful we have to export.
  * Enable exceptions
jonathanpeppers added a commit that referenced this pull request Jan 15, 2025
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.
jonpryor pushed a commit that referenced this pull request Jan 21, 2025
…#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:
  [XABT] Create separate assembly preparation tasks. (#9637)
  Add `activity-alias` support (#9654)
  [CI] Grab 'dotnet-install.sh' script directly from GitHub. (#9699)
* main:
  [NativeAOT] add sample that runs successfully (#9636)
* main:
  [Xamarin.Android.Build.Tasks] Rework DTB to use .aar files directly (#9700)
CoreCLR will not use the assembly blob at all, instead the properties
will be handed over to the runtime per request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants