Enable CoreCLR runtime pack for android-arm (armeabi-v7a)#11172
Enable CoreCLR runtime pack for android-arm (armeabi-v7a)#11172simonrozsival wants to merge 3 commits intomainfrom
Conversation
Enable the CoreCLR runtime flavor for the armeabi-v7a ABI, following the same pattern as android-arm64 and android-x64. Changes: - Set SupportCoreCLR=True for armeabi-v7a in Ndk.projitems.in - Add ApiLevelNonMono metadata and corresponding property/placeholder - Add Microsoft.Android.Runtime.CoreCLR.36.1.android-arm to workload manifest Depends on dotnet/runtime#127225 and dotnet/runtime#126838 (API level 24). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Enables CoreCLR runtime-pack support metadata for the android-arm (armeabi-v7a) ABI so the Android workload can include a CoreCLR pack for that RID, matching existing arm64/x64 patterns.
Changes:
- Add
Microsoft.Android.Runtime.CoreCLR.36.1.android-armto the Android workload manifest packs list and pack definitions. - Update
Ndk.projitems.into markarmeabi-v7aasSupportCoreCLR=Trueand add anApiLevelNonMonovalue for that ABI. - Extend xaprepare placeholder generation to replace the new
@NDK_ARMEABI_V7_API_NON_MONO@placeholder.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json |
Adds the CoreCLR android-arm runtime pack to the workload manifest. |
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs |
Adds placeholder substitution for the new arm32 non-mono NDK API placeholder used by generated projitems. |
build-tools/scripts/Ndk.projitems.in |
Marks armeabi-v7a as CoreCLR-supported and introduces an arm32 non-mono API-level property/metadata. |
| <AndroidRID>android-arm</AndroidRID> | ||
| <SupportMonoVM>True</SupportMonoVM> | ||
| <SupportCoreCLR>False</SupportCoreCLR> | ||
| <SupportCoreCLR>True</SupportCoreCLR> |
There was a problem hiding this comment.
Setting True for armeabi-v7a makes the build/packs treat android-arm CoreCLR as supported, but the rest of the repo is not wired up for it yet: src/native/native-clr.csproj still restricts AndroidSupportedTargetJitAbis to arm64-v8a:x86_64, src/native/CMakePresets.json.in has no coreclr-* presets for armeabi-v7a, and the CoreCLR/NonMono min-API mapping in XABuildConfig.ArchToApiLevelNonMono has no AndroidTargetArch.Arm entry (MonoAndroidHelper.GetMinimumApiLevel will throw for CoreCLR+Arm). Either keep SupportCoreCLR=false for armeabi-v7a for now, or add the missing native presets/build support and the ArchToApiLevelNonMono entry so CoreCLR android-arm builds are actually possible.
| <SupportCoreCLR>True</SupportCoreCLR> | |
| <SupportCoreCLR>False</SupportCoreCLR> |
| "Microsoft.Android.Runtime.36.1.android", | ||
| "Microsoft.Android.Runtime.Mono.36.1.android-arm", | ||
| "Microsoft.Android.Runtime.Mono.36.1.android-arm64", | ||
| "Microsoft.Android.Runtime.Mono.36.1.android-x86", | ||
| "Microsoft.Android.Runtime.Mono.36.1.android-x64", | ||
| "Microsoft.Android.Runtime.CoreCLR.36.1.android-arm", | ||
| "Microsoft.Android.Runtime.CoreCLR.36.1.android-arm64", | ||
| "Microsoft.Android.Runtime.CoreCLR.36.1.android-x64", |
There was a problem hiding this comment.
The workload manifest now declares Microsoft.Android.Runtime.CoreCLR.36.1.android-arm as part of the android workload. With the current repo state, CoreCLR native runtime builds/packs are only produced for arm64/x86_64 (see src/native/native-clr.csproj and CMake presets), so this entry is likely to make workload install/pack creation fail or produce an incomplete runtime pack for android-arm. Please ensure the CoreCLR android-arm runtime pack is actually generated and published by the build (native runtime build + runtime pack creation) before listing it here, or gate the manifest entry until those pieces are in place.
|
@copilot address the review and make sure the rest of the repo is ready for armeabi-v7a support |
Agent-Logs-Url: https://github.com/dotnet/android/sessions/57a8b6d4-93df-4f84-9b77-3a58a6e2158b Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
Wired up the remaining pieces in 84c9882:
|
Note
This PR was AI/Copilot-generated.
Summary
Enable the CoreCLR runtime flavor for the
armeabi-v7a(android-arm) ABI, following the same pattern as android-arm64 and android-x64.Changes
build-tools/scripts/Ndk.projitems.inSupportCoreCLR=Trueforarmeabi-v7a(wasFalse)ApiLevelNonMonometadata (referencing the newAndroidNdkApiLevelNonMono_Armproperty)AndroidNdkApiLevelNonMono_Armproperty with@NDK_ARMEABI_V7_API_NON_MONO@placeholderbuild-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs@NDK_ARMEABI_V7_API_NON_MONO@→NdkMinimumNonMonoAPIplaceholder replacementWorkloadManifest.in.jsonMicrosoft.Android.Runtime.CoreCLR.36.1.android-armto the workload packs list and pack definitionsDependencies