[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[android] Enable android-arm CoreCLR with softfp ABI handling - #127578

Merged
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup
May 19, 2026
Merged

[android] Enable android-arm CoreCLR with softfp ABI handling#127578
simonrozsival merged 34 commits into
dotnet:mainfrom
simonrozsival:dev/simonrozsival/android-arm-ci-setup

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 29, 2026

Copy link
Copy Markdown
Member

Note

This PR description was updated with GitHub Copilot.

Fixes#127500.

Description

This re-enables the android-arm CoreCLR runtime pack and CI coverage, and fixes the Android ARM softfp ABI handling needed for native code, ReadyToRun/Crossgen2-generated code, and NativeAOT target handling.

Android arm maps to the armeabi-v7a ABI. That ABI can use VFP instructions internally, but floating-point arguments and return values cross function-call boundaries through core registers/stack rather than VFP argument registers. In .NET target terminology, the matching AOT/JIT ABI is armel.

The original enablement exposed runtime crashes caused by parts of the build and code-generation pipeline disagreeing on that ABI. Native/CoreCLR builds needed ARM_SOFTFP, and AOT compiler target handling needed to treat Android ARM as Linux/Bionic with the softfp ABI.

Changes

  • Re-enable android-arm as a supported CoreCLR runtime pack target.

  • Re-enable Android ARM CoreCLR legs in the runtime and extra-platform CI pipelines.

  • Add Android ARM Helix queue selection.

  • Set ARM_SOFTFP for Android ARM native/CoreCLR builds.

  • Treat Android ARM compile definitions as softfp when setting CoreCLR target definitions.

  • Keep Android as an accepted AOT command-line target OS without extending the internal TargetOS enum.

  • Centralize Android command-line normalization in both Crossgen2 and NativeAOT ILCompiler:

    --targetos:android -> TargetOS.Linux
    --targetos:android --targetarch:arm -> NativeAotArmel / softfp ABI
    --targetos:android --targetarch:arm64 -> NativeAot
    
  • Update Crossgen2 call sites to pass the real Android target identity instead of duplicating Android-to-Linux remaps in MSBuild.

  • Update NativeAOT build integration to pass --targetos:android through to ILCompiler while preserving the existing bionic ARM armel target-architecture handling.

Validation

Built Android ARM locally:

./build.sh clr+libs+host+packs -os android -arch arm -c Release

Result:

Build succeeded.
0 Warning(s)
0 Error(s)

Validated on a physical Android device with armeabi-v7a support.

The following Android ARM test runs completed with zero failures with both TestReadyToRun=true and TestReadyToRun=false:

  • System.Runtime.Tests
  • System.Runtime.Numerics.Tests
  • System.Numerics.Vectors.Tests
  • System.Numerics.Tensors.Tests
  • Microsoft.Bcl.Numerics.Tests

Additional validation for the centralized AOT target handling:

./build.sh clr+libs+host /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/crossgen2/crossgen2.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj /p:RestoreDisableParallel=true
./dotnet.sh build src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj /p:RestoreDisableParallel=true
./build.sh tasks /p:RestoreDisableParallel=true
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj /t:Test --no-restore
./dotnet.sh build src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj /t:Test --no-restore

Also smoke-tested that both Crossgen2 and ILCompiler accept Android target arguments, including --targetos:android --targetarch:arm and --targetos:android --targetarch:arm64, and that the existing --targetos:linux --targetarch:armel normalization still works.

simonrozsivaland others added 2 commits April 29, 2026 19:36
Enable the softfp ABI for Android ARM native/CoreCLR builds.
Teach Crossgen2 to accept android as a target OS and choose the armel ABI for android-arm before normalizing the target OS to Linux for existing object and runtime behavior.
Update the CoreLib, library test, SDK, and in-tree Android R2R callers to pass android/arm directly so linux-bionic RIDs keep their existing behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the android-arm CoreCLR runtime pack and CI enablement from dotnet#127225 now that the ABI handling is fixed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings April 29, 2026 18:40
@github-actionsgithub-actionsBot added the area-crossgen2-coreclr only use for closed issues label Apr 29, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-enables android-arm (armeabi-v7a) CoreCLR runtime pack production and CI by ensuring Crossgen2/JIT agree on Android ARM32’s required softfp call-boundary ABI (modeled as armel in the type system), while keeping the rest of Crossgen2’s behavior on existing Linux/Bionic paths.

Changes:

  • Teach Crossgen2 to accept --targetos:android, and for android-arm select the softfp (armel) ABI then normalize the OS to Linux for the remaining pipeline.
  • Update Android build/plumbing to pass the real $(TargetOS) to Crossgen2 (instead of remapping Android to Linux at the caller).
  • Re-enable android_arm CoreCLR runtime pack support and restore CI/Helix coverage, including Android ARM queue mapping.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.csAllows the Crossgen2 task logic to resolve android as a target OS from RID graph matching.
src/mono/msbuild/android/build/AndroidBuild.InTree.targetsPasses $(TargetOS) through to Crossgen2 for Android in-tree builds.
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxprojStops remapping Android to Linux for Crossgen2 invocation; passes $(TargetOS) directly.
src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.csAdds TargetOS.Android to represent Android explicitly in target selection.
src/coreclr/tools/Common/CommandLineHelpers.csEnables parsing --targetos:android into TargetOS.Android.
src/coreclr/tools/aot/crossgen2/Program.csImplements Android normalization: select softfp (NativeAotArmel) for Android ARM32, then treat as Linux for the remaining Crossgen2 logic.
src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.csUpdates extended help to include android as a valid --targetos value.
src/coreclr/crossgen-corelib.projAlways passes --targetos:$(TargetOS) (removes Android→Linux remap at the caller).
src/coreclr/clrdefinitions.cmakeDefines ARM_SOFTFP for Android ARM32 targets so native/JIT compilation agrees on softfp.
eng/testing/tests.readytorun.targetsPasses $(TargetOS) to Crossgen2 for test R2R flows (removes Android→Linux remap).
eng/Subsets.propsRe-enables CoreCLR support gating for Android ARM32 (still excludes Android x86).
eng/pipelines/runtime.ymlRe-adds android_arm CoreCLR functional test coverage in the main pipeline matrix.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.ymlAdds android_arm CoreCLR coverage in the extra-platforms Android pipeline.
eng/pipelines/coreclr/templates/helix-queues-setup.ymlAdds Helix queue mapping for the android_arm platform.
eng/native/configureplatform.cmakeSets ARM_SOFTFP for Android ARM32 at CMake configuration time.

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment threadsrc/coreclr/tools/aot/crossgen2/Program.cs Outdated
This was referenced Apr 30, 2026
@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Note

This CI analysis comment was drafted with Copilot.

I compared the current CI on #127578 with the original Android ARM runtime-pack enablement PR, #127225, and the first softfp follow-up, #127527. My read is that the original Android ARM ABI mismatch is not manifesting in the current run: the exact smoke job that exposed it before now passes.

PR / buildAndroid ARM signalVerdict
#127225, build 1398504android-arm Release AllSubsets_CoreCLR_Smoke failed across smoke work itemsOriginal ABI mismatch manifested; tracked by #127500 as SIGSEGV during runner init at System.DateTime.get_Now()
#127527, build 1400569Same android-arm CoreCLR_Smoke job still failedPartial fix only; follow-up local investigation found remaining R2R ABI corruption symptoms like Hashtable(... Single loadFactor), Decimal.op_Explicit / VarDecFromR8, and NFloat
#127578, build 1402505android-arm Release AllSubsets_CoreCLR_Smoke passedStrong evidence the old smoke-level ABI issue is fixed
#127578, build 1402544Full Android legs still have failuresDifferent failure set; not the old ARM ABI signature

Current Android pass/fail breakdown:

JobResultFailed work items / notes
android-arm CoreCLR_SmokePassNo failed work items
android-arm64 CoreCLR_SmokePassNo failed work items
android-x64 CoreCLR_SmokePassNo failed work items
android-arm64 Mono_SmokePassNo failed work items
android-x64 MonoAOTOffsetsPassNo failed work items
android-x64 AllSubsets_MonoPassNo failed work items
android-x64 Mono RuntimeTests_InterpPassNo failed work items
android-x64 NativeAOT_RuntimeTestsPassNo failed work items
android-arm AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.NameResolution.Pal.Tests, System.Net.Sockets.Tests
android-arm64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.NameResolution.Functional.Tests, System.Net.Sockets.Tests
android-x64 AllSubsets_CoreCLRFailSystem.IO.Compression.Tests, System.Net.Sockets.Tests
android-x64 NativeAOTFailSystem.IO.Compression.Tests, System.Linq.Expressions.Tests, System.Net.Sockets.Tests

Failure classification:

  • System.IO.Compression.Tests: the failing tests are the three RoundTrip_AllWindowLogs cases, all returning DestinationTooSmall. I reproduced these locally on android-arm CoreCLR both with and without R2R, so this is not R2R-specific. This matches the broader mobile compression issue tracked by #127563.
  • System.Net.NameResolution.*: matches the existing Android/mobile networking/configuration failure class tracked by #126456.
  • System.Net.Sockets.Tests: matches the existing Android socket/IPv6 failure class tracked by #127565.
  • android-x64 NativeAOT / System.Linq.Expressions.Tests: still looks unclassified from this pass and should be investigated or tracked separately.

I also searched the current downloaded Android AzDO/Helix logs for the old ABI signatures: System.DateTime.get_Now, SIGSEGV / SIGABRT, managed Hashtable..ctor(... Single loadFactor), loadFactor, Decimal.op_Explicit, VarDecFromR8, NFloat, and arithmetic-overflow R2R corruption. None of those signatures appear in the current Android logs; the only Hashtable hit is a native source filename (jithashtable.cpp) in build output.

So I would not treat the current red CI as evidence that the original Android ARM ABI mismatch is still present. The important ABI validation signal passed; the remaining Android failures are later library/test-suite issues, mostly already represented by known mobile issues, with the NativeAOT System.Linq.Expressions failure as the remaining item to classify.

simonrozsivaland others added 2 commits April 30, 2026 12:15
Keep Android as Linux for Crossgen2 and pass armel from in-tree MSBuild callers so the compiler selects the softfp ABI without making Android a first-class Crossgen2 OS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the Android ARM Crossgen2 remap with the existing _CrossGenTargetOS naming pattern and use _CrossGenTargetArch for the architecture remap. Keep the Android in-tree target simpler by hardcoding Crossgen2 TargetOS metadata to linux.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings May 14, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadeng/pipelines/runtime.yml
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/coreclr/clrdefinitions.cmake Outdated
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Comment threadsrc/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
CopilotAI review requested due to automatic review settings May 19, 2026 07:35

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadeng/native/gen-buildsys.sh
@simonrozsival
simonrozsival merged commit 1753549 into dotnet:mainMay 19, 2026
215 of 220 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-preview6 milestone May 21, 2026
@clamp03clamp03 mentioned this pull request Jun 10, 2026
jkotas pushed a commit that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in #127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
Fixes an issue on Tizen targets following changes in dotnet#127578.
By correctly identifying the Tizen ARM host and setting
CLR_CMAKE_HOST_ARCH to "armel",
this ensures that the required SOFTFP build option is properly applied,
resolving the runtime failure.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 21, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[android] Got a SIGSEGV while executing native code. at System.DateTime.get_Now()

8 participants

@simonrozsival@MichalStrehovsky@jkotas@vitek-karas@steveisok@am11@kotlarmilos