-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix cross compilation of LLVM to aarch64 Windows targets #74116
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
|
With this change, it should be possible to compile for |
The changes here are somewhat obscure but they seem fine to land, r? @pietroalbini for testing and such though |
For testing this you might be able to run That should produce a build and I think even upload it to s3 for later testing, but it should otherwise assist in debugging whether this will work on CI or not. |
To test this you can create another builder in Unfortunately we don't currently have enough capacity to add a permanent builder though. |
Yay race conditions! Let's do the try build on Azure Pipelines, we have less capacity issues there. |
Thanks for the help! I added a job to Not sure if I'm allowed to run it: @bors try |
@arlosi: 🔑 Insufficient privileges: not in try users |
@bors try |
⌛ Trying commit 8d9f968419c92ebdd7eea750408bd9faaa1c4904 with merge 609dab75420c8bdf973843c16a12b4b8109243c7... |
💔 Test failed - checks-azure |
|
I added an aarch64 case that uses the x86_64 mingw, which should at least work for the experiment. |
@bors try |
⌛ Trying commit f426c576be1777fd1597dcf1d3a4bf4532fc2731 with merge 4367d63f1de115d200672e0f7352844919562023... |
It failed again because it tried to download a bootstrap aarch64 compiler. I pushed a new commit to set Can we try again? |
@bors try |
⌛ Trying commit b0a2c3d81db7239468c973702ef7c2730dfab89c with merge bff4694205ae04a1aea91bb5f39aeb8b0b3d9d4e... |
Fix cross compilation of LLVM to aarch64 Windows targets When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build. This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built. If compiling with clang-cl, adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target. Related issue: rust-lang#72881 Requires LLVM change: rust-lang/llvm-project#67
Fix cross compilation of LLVM to aarch64 Windows targets When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build. This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built. If compiling with clang-cl, adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target. Related issue: rust-lang#72881 Requires LLVM change: rust-lang/llvm-project#67
…arth Rollup of 10 pull requests Successful merges: - rust-lang#72920 (Stabilize `transmute` in constants and statics but not const fn) - rust-lang#73715 (debuginfo: Mangle tuples to be natvis friendly, typedef basic types) - rust-lang#74066 (Optimize is_ascii for str and [u8].) - rust-lang#74116 (Fix cross compilation of LLVM to aarch64 Windows targets) - rust-lang#74167 (linker: illumos ld does not support --eh-frame-hdr) - rust-lang#74168 (Add a help to use `in_band_lifetimes` in nightly) - rust-lang#74197 (Reword incorrect `self` token suggestion) - rust-lang#74213 (Minor refactor for rustc_resolve diagnostics match) - rust-lang#74240 (Fix rust-lang#74081 and add the test case from rust-lang#74236) - rust-lang#74241 (update miri) Failed merges: r? @ghost
When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build.
This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built.
If compiling with clang-cl, adds the
--target
option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target.Related issue: #72881
Requires LLVM change: rust-lang/llvm-project#67