Skip to content

Commit c53af1c

Browse files
committed
Auto merge of rust-lang#138148 - onur-ozkan:fix-llvm-bitcode-build, r=jieyouxu
use target compiler on llvm-bitcode-linker The build compiler is already resolved inside the `ToolBuild` step, so we should pass only the target compilers for `Mode::ToolRustc` tools. Fixes rust-lang#138123 r? ghost try-job: dist-powerpc64le-linux
2 parents 03eb454 + 4227055 commit c53af1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1991,12 +1991,12 @@ impl Step for Assemble {
19911991
}
19921992
}
19931993

1994-
let maybe_install_llvm_bitcode_linker = |compiler| {
1994+
let maybe_install_llvm_bitcode_linker = || {
19951995
if builder.config.llvm_bitcode_linker_enabled {
19961996
trace!("llvm-bitcode-linker enabled, installing");
19971997
let llvm_bitcode_linker =
19981998
builder.ensure(crate::core::build_steps::tool::LlvmBitcodeLinker {
1999-
compiler,
1999+
compiler: target_compiler,
20002000
target: target_compiler.host,
20012001
extra_features: vec![],
20022002
});
@@ -2020,7 +2020,7 @@ impl Step for Assemble {
20202020
builder.info(&format!("Creating a sysroot for stage{stage} compiler (use `rustup toolchain link 'name' build/host/stage{stage}`)", stage=target_compiler.stage));
20212021
}
20222022

2023-
maybe_install_llvm_bitcode_linker(target_compiler);
2023+
maybe_install_llvm_bitcode_linker();
20242024

20252025
return target_compiler;
20262026
}
@@ -2203,7 +2203,7 @@ impl Step for Assemble {
22032203
);
22042204
}
22052205

2206-
maybe_install_llvm_bitcode_linker(build_compiler);
2206+
maybe_install_llvm_bitcode_linker();
22072207

22082208
// Ensure that `libLLVM.so` ends up in the newly build compiler directory,
22092209
// so that it can be found when the newly built `rustc` is run.

0 commit comments

Comments
 (0)