Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9127b77
Fix Android ARM softfp ABI handling
simonrozsival Apr 29, 2026
9aab8ac
Enable Android ARM CoreCLR CI
simonrozsival Apr 29, 2026
5e6a157
Map Android ARM Crossgen2 invocations to armel
simonrozsival Apr 30, 2026
95f8bec
Use CrossGen target property naming for Android remap
simonrozsival Apr 30, 2026
8f2df4d
Centralize Android target handling in AOT tools
simonrozsival Apr 30, 2026
8d9c811
Normalize Android AOT target at command line boundary
simonrozsival Apr 30, 2026
75eddef
Cleanup
simonrozsival May 4, 2026
a10d06f
Address AOT target option review feedback
simonrozsival May 5, 2026
561f041
Merge branch 'main' of github.com:dotnet/runtime into dev/simonrozsiv…
simonrozsival May 5, 2026
86b8be3
Clean up
simonrozsival May 5, 2026
ae475c9
Always pass android target OS directly
simonrozsival May 5, 2026
7881483
Undo unnecessary changes
simonrozsival May 5, 2026
450ec03
Rename GetTargetDetails to GetTargetSpec
simonrozsival May 5, 2026
ce21d4a
Clean up
simonrozsival May 5, 2026
8ff1e3e
Add armel to the list of valid architectures for ilc
simonrozsival May 5, 2026
3405a8d
Remove unnecessary <arg>
simonrozsival May 6, 2026
90ff6d6
Update valid os and architecture for help
simonrozsival May 6, 2026
e1a1245
Remove redundant cmake configuration
simonrozsival May 6, 2026
956a735
Switch to the new Android.Arm32 queue
simonrozsival May 7, 2026
57a0998
Update helix queues setup
simonrozsival May 7, 2026
7d81b13
Apply suggestion from @jkotas
jkotas May 8, 2026
1022e38
Potential fix for pull request finding
jkotas May 8, 2026
bf09f90
Apply suggestion from @jkotas
jkotas May 8, 2026
c7a1eb2
Do not use the new Windows.11.Amd64.Android.Arm32.Open just yet
simonrozsival May 11, 2026
bd7cc36
Disable android arm32 CI
simonrozsival May 12, 2026
1447db1
Disable android_arm platform in runtime.yml
simonrozsival May 13, 2026
5b21474
Set ARM_SOFTFP for Android ARM native builds
simonrozsival May 13, 2026
ded8f94
Fix gen-buildsys.sh
simonrozsival May 13, 2026
f36213f
Revert "Fix gen-buildsys.sh"
simonrozsival May 14, 2026
dac2431
Revert "Set ARM_SOFTFP for Android ARM native builds"
simonrozsival May 14, 2026
0722916
Remove the ARM_SOFTFP definition from gen-buildsys.sh
simonrozsival May 14, 2026
ae66079
Update android cmake
simonrozsival May 14, 2026
0bdd8a3
Enable CI using Windows.11.Amd64.Android.Open queue for the time being
simonrozsival May 14, 2026
03356f2
Switch to the new Windows.11.Amd64.Android-armel.Open helix queue for…
simonrozsival May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
<!-- Determine if the CoreCLR runtime can build/run for the specified target. -->
<_CoreCLRSupportedOS Condition="'$(TargetsMobile)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">true</_CoreCLRSupportedOS>

<!-- Android 32-bit builds blocked by https://github.com/dotnet/runtime/issues/111665 -->
<_CoreCLRSupportedOS Condition="'$(TargetsAndroid)' == 'true' and '$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'x86'">true</_CoreCLRSupportedOS>
<_CoreCLRSupportedOS Condition="'$(TargetsAndroid)' == 'true' and '$(TargetArchitecture)' != 'x86'">true</_CoreCLRSupportedOS>
<_CoreCLRSupportedOS Condition="'$(TargetsBrowser)' == 'true'">true</_CoreCLRSupportedOS>
<_CoreCLRSupportedOS Condition="'$(TargetsAppleMobile)' == 'true'">true</_CoreCLRSupportedOS>

Expand Down
4 changes: 4 additions & 0 deletions eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ if(CLR_CMAKE_TARGET_OS STREQUAL android)
set(CLR_CMAKE_TARGET_ANDROID 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL android)

if(CLR_CMAKE_TARGET_ANDROID AND CLR_CMAKE_TARGET_ARCH_ARM)
Comment thread
simonrozsival marked this conversation as resolved.
Outdated
set(ARM_SOFTFP 1)
endif()

if(CLR_CMAKE_TARGET_OS STREQUAL darwin)
set(CLR_CMAKE_TARGET_UNIX 1)
set(CLR_CMAKE_TARGET_APPLE 1)
Expand Down
7 changes: 7 additions & 0 deletions eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ jobs:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- OSX.15.Amd64

# Android arm
- ${{ if in(parameters.platform, 'android_arm') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- Windows.11.Amd64.Android.Open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- Windows.11.Amd64.Android

# Android arm64
- ${{ if in(parameters.platform, 'android_arm64') }}:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
buildConfig: Release
runtimeFlavor: coreclr
platforms:
- android_arm
Comment thread
simonrozsival marked this conversation as resolved.
- android_arm64
Comment thread
simonrozsival marked this conversation as resolved.
variables:
# map dependencies variables to local variables
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ extends:
eq(variables['isRollingBuild'], true))

#
# Android arm64 devices and x64 emulators
# Android arm/arm64 devices and x64 emulators
Comment thread
simonrozsival marked this conversation as resolved.
# Build the whole product using CoreCLR and run functional tests
#
- template: /eng/pipelines/common/platform-matrix.yml
Expand All @@ -1109,6 +1109,7 @@ extends:
buildConfig: Release
runtimeFlavor: coreclr
platforms:
- android_arm
Comment thread
simonrozsival marked this conversation as resolved.
- android_x64
- android_arm64
variables:
Expand Down
4 changes: 1 addition & 3 deletions eng/testing/tests.readytorun.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
<Target Name="ResolveReadyToRunCompilers">
<PropertyGroup>
<Crossgen2Path>$([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)'))</Crossgen2Path>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' != 'true'">$(TargetOS)</_CrossGenTargetOS>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' == 'true'">linux</_CrossGenTargetOS>
</PropertyGroup>

<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="$(_CrossGenTargetOS)"
TargetOS="$(TargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>
</Target>
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/clrdefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ function(set_target_definitions_to_custom_os_and_arch)
target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_WASM32)
endif()

if (TARGETDETAILS_ARCH STREQUAL "armel")
if (TARGETDETAILS_ARCH STREQUAL "armel" OR
(TARGETDETAILS_ARCH STREQUAL "arm" AND CLR_CMAKE_TARGET_ANDROID))
Comment thread
jkotas marked this conversation as resolved.
Outdated
target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE ARM_SOFTFP)
Comment thread
simonrozsival marked this conversation as resolved.
Outdated
Comment thread
jkotas marked this conversation as resolved.
Outdated
endif()
Comment thread
simonrozsival marked this conversation as resolved.
Outdated
endfunction()
4 changes: 1 addition & 3 deletions src/coreclr/crossgen-corelib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@
<CrossGenDllCmd>$(CrossGenDllCmd) --targetarch:$(TargetArchitecture)</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(PublishReadyToRunContainerFormat)' != ''">$(CrossGenDllCmd) --obj-format:$(PublishReadyToRunContainerFormat)</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(UseComposite)' == 'true'">$(CrossGenDllCmd) --composite</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(TargetsAndroid)' != 'true'">$(CrossGenDllCmd) --targetos:$(TargetOS)</CrossGenDllCmd>
<!-- Unless and until Android requires R2R specific customizations, we're just dealing with another linux -->
<CrossGenDllCmd Condition="'$(TargetsAndroid)' == 'true'">$(CrossGenDllCmd) --targetos:linux</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) --targetos:$(TargetOS)</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(UsingToolIbcOptimization)' != 'true' and '$(EnableNgenOptimization)' == 'true'">$(CrossGenDllCmd) -m:$(MergedMibcPath) --embed-pgo-data</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) -O</CrossGenDllCmd>
<!-- Enable type and field layout verification to make it easier to catch when the crossgen2 type layout engine and the runtime disagree on layout conventions -->
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tools/Common/CommandLineHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public static TargetOS GetTargetOS(string token)
"tvos" => TargetOS.tvOS,
"browser" => TargetOS.Browser,
"wasi" => TargetOS.Wasi,
"android" => TargetOS.Android,
_ => throw new CommandLineException($"Target OS '{token}' is not supported")
};
}
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/tools/Common/TypeSystem/Common/TargetDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public enum TargetOS
NetBSD,
SunOS,
Browser,
Wasi
Wasi,
Android
}

public enum TargetAbi
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static void PrintExtendedHelp(ParseResult _)
Console.WriteLine();

string[] ValidArchitectures = ["arm", "armel", "arm64", "x86", "x64", "riscv64", "loongarch64", "wasm"];
string[] ValidOS = ["windows", "linux", "osx", "ios", "iossimulator", "maccatalyst", "browser"];
Comment thread
simonrozsival marked this conversation as resolved.
string[] ValidOS = ["windows", "linux", "android", "osx", "ios", "iossimulator", "maccatalyst", "browser"];

Console.WriteLine(String.Format(SR.SwitchWithDefaultHelp, "--targetos", String.Join("', '", ValidOS), Helpers.GetTargetOS(null).ToString().ToLowerInvariant()));
Console.WriteLine();
Expand Down
12 changes: 11 additions & 1 deletion src/coreclr/tools/aot/crossgen2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ public int Run()

TargetArchitecture targetArchitecture = Get(_command.TargetArchitecture);
TargetOS targetOS = Get(_command.TargetOS);
TargetAbi targetAbi = Crossgen2RootCommand.IsArmel ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot;

if (targetOS == TargetOS.Android)
Comment thread
simonrozsival marked this conversation as resolved.
Outdated
{
// android-arm maps to Android's armeabi-v7a ABI, which uses softfp call boundaries.
// The rest of Crossgen2's Android behavior matches Linux/Bionic.
targetOS = TargetOS.Linux;
targetAbi = targetArchitecture == TargetArchitecture.ARM ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot;
}

bool allowOptimistic = _command.OptimizationMode != OptimizationMode.PreferSize;

if (targetOS is TargetOS.iOS or TargetOS.tvOS or TargetOS.iOSSimulator or TargetOS.tvOSSimulator or TargetOS.MacCatalyst or TargetOS.Browser)
Expand All @@ -100,7 +110,7 @@ public int Run()
allowOptimistic: allowOptimistic,
isReadyToRun: true);
SharedGenericsMode genericsMode = SharedGenericsMode.CanonicalReferenceTypes;
var targetDetails = new TargetDetails(targetArchitecture, targetOS, Crossgen2RootCommand.IsArmel ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot, instructionSetSupport.GetVectorTSimdVector());
var targetDetails = new TargetDetails(targetArchitecture, targetOS, targetAbi, instructionSetSupport.GetVectorTSimdVector());

ConfigureImageBase(targetDetails);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@
<Target Name="ResolveReadyToRunCompilers" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<PropertyGroup>
<Crossgen2Path>$([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)'))</Crossgen2Path>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' != 'true'">$(TargetOS)</_CrossGenTargetOS>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' == 'true'">linux</_CrossGenTargetOS>
</PropertyGroup>

<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="$(_CrossGenTargetOS)"
TargetOS="$(TargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="linux"
TargetOS="$(TargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>
</Target>
Expand Down
3 changes: 2 additions & 1 deletion src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ private bool GetCrossgen2TargetOS(out string targetOS)
string portablePlatform = NuGetUtils.GetBestMatchingRid(
runtimeGraph,
_targetRuntimeIdentifier,
new[] { "linux", "osx", "win", "freebsd", "illumos" },
new[] { "android", "linux", "osx", "win", "freebsd", "illumos" },
out _);

targetOS = portablePlatform switch
{
"android" => "android",
Comment thread
simonrozsival marked this conversation as resolved.
"linux" => "linux",
"osx" => "osx",
"win" => "windows",
Comment thread
jkotas marked this conversation as resolved.
Expand Down
Loading