-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Cross-compile Wasm cross-compilers for ARM64 machines #74428
Cross-compile Wasm cross-compilers for ARM64 machines #74428
Conversation
Mostly builds android-arm64 cross compiler for linux-arm64 on linux-x64, but fails on linker step as we still try to use linux-x64 LLVM for linking.
Tagging subscribers to this area: @directhex Issue DetailsSo far, I know this lets me build an android-arm64 cross-compiler for linux-arm64 from a linux-x64 host. Let's see what I broke Closes: #74175
|
…ike-cross-compilers-so-i-cross-compiled-your-cross-compiler
Dunno about CI, but I've validated locally that this is producing what I expect.
|
Windows remains "entirely cursed" at this point. When someone can show me a Mono JIT build for Windows ARM64, I will make a |
…ike-cross-compilers-so-i-cross-compiled-your-cross-compiler
I had to rebase this for an LLVM version bump in main. |
@@ -170,11 +170,13 @@ jobs: | |||
- eng/Versions.props | |||
- eng/testing/scenarios/BuildWasmAppsJobsList.txt | |||
- eng/testing/workloads-testing.targets | |||
- src/installer/pkg/sfx/Microsoft.NETCore.App/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I don't think any test failures are related to my changes? |
nope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@directhex This may have broken the official build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2081388&view=results |
@mmitche I'll try to reproduce it |
I'm narrowing in on where it's going wrong - when monoaotcross.proj calls into sub-projects to do the cross-compiler builds, it's using a PackageRID of |
Problem is specific to |
Working locally via #80316 |
Resolves official build breakage caused by #74428 (where `PackageRID` can be `linux-wasm` or `osx-wasm` instead of `browser-wasm` when `/p:PortableBuild=true`, but `OutputRid` is fine)
This PR enables building arbitrary cross-compilers for non-x64 hosts. Right now, only osx-arm64->browser-wasm and linux-arm64->browser-wasm are actually enabled, as runtime bugs prevent us from building any arm64->x86 or arm64->x64 cross-compilers. Getting this framework in will unblock workload work related to "native" wasm on M1 Mac.
BREAKING CHANGE FOR DEVELOPERS
MonoAOTLLVMDir
no longer exists.Old:
/p:MonoLLVMDir=/path/to/llvm
specifies the directory with LLVM binaries compiled for$(TargetArchitecture)
, for compiling the Mono JIT on that target architecture/p:MonoAOTLLVMDir=/path/to/llvm
specifies the directory with LLVM binaries compiled for$(BuildArchitecture)
, for compiling themono-aot-cross
executableNew:
/p:MonoLLVMDir=/path/to/llvm
specifies a parent-level directory with LLVM binaries compiled for relevant architectures - e.g.$(MonoLLVMDir)\x64
contains LLVM built for x64, current OS.$(MonoLLVMDir)\arm64
contains LLVM built for arm64, current OS.You do not need to specify
/p:MonoLLVMDir=
manually, unless you are a developer who may be using custom, non-nupkg LLVM (i.e. your name is Zoltan)This change is necessary to stop hardcoding the assumptions that a)
$(BuildArchitecture)
is alwaysx64
and b) AOT binaries should be compiled for$(BuildArchitecture)
Closes: #74175