[NativeAOT-LLVM] Add linux-arm64 build and testing #3115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.yml
s), 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.