]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #74116 - arlosi:aarch64build, r=pietroalbini
authorManish Goregaokar <manishsmail@gmail.com>
Sat, 11 Jul 2020 15:53:18 +0000 (08:53 -0700)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 15:53:18 +0000 (08:53 -0700)
commit9614238314821eff041a2fb38f1bf5acca5b24c3
treeb6735d38f522573fe64c1f98f906833680d3c901
parent1979fa86f9fd8cc53384d2dabe775bcbf012a5ad
parent59f979fa06fed49e02606d4891b5b5e4fc545725
Rollup merge of #74116 - arlosi:aarch64build, r=pietroalbini

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: #72881
Requires LLVM change: rust-lang/llvm-project#67
Cargo.lock