Skip to content

[NativeAOT-LLVM] Add linux-arm64 build and testing #3115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: feature/NativeAOT-LLVM
Choose a base branch
from

Conversation

SingleAccretion
Copy link

@SingleAccretion SingleAccretion commented May 30, 2025

We do not have linux-arm64-hosted build machines, only linux-x64 crosscompiling to arm64, so while the build process is fairly straightforward (tunneling the "host target arch" though the .ymls), testing is a bit tricky.

The solution I've settled on is to just use qemu user mode emulation, the ILC targets only needed a very minimal change to enable this. So while we do produce real arm64 packages and all, the only part that's "arm64" in this new build is this emulated ILC. Fortunately, it is also the only part that "needs" to be arm64.

It is an imperfect approach, since e. g. it doesn't catch arm64-specific issues in downstream components like EMSDK/WASI-SDK, but it is better than the current state of no arm64 at all. Even the "proper" alternative of using Helix would require us to move the whole build there to exercise native arm64 EMSDK/WASI-SDK.

Another downside to this is the Linux-only nature of qemu, so, unfortunately, Windows ARM64 is not opened up by this change.

Important: I am not adding anything to the official build yet. It will be a separate change, so that we can revert it by itself if needed.

@jkotas jkotas added the area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly) label May 30, 2025
@SingleAccretion SingleAccretion force-pushed the More-Plat branch 14 times, most recently from 7131258 to 6755c1d Compare June 6, 2025 20:15
@SingleAccretion SingleAccretion force-pushed the More-Plat branch 2 times, most recently from d03d65e to bb34b4a Compare June 7, 2025 10:14
@SingleAccretion SingleAccretion changed the title [NativeAOT-LLVM] Work in progress [NativeAOT-LLVM] Add linux-arm64 build and testing Jun 7, 2025
The goal is to get rid of switches on specific platforms.
@SingleAccretion SingleAccretion marked this pull request as ready for review June 19, 2025 19:21
@SingleAccretion
Copy link
Author

@dotnet/nativeaot-llvm The linux-arm64 change.

The CI failure is unrelated (dotnet/runtime#116746).

@SingleAccretion
Copy link
Author

More dotnet/runtime/issues/116746-like CI failures...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants