Skip to content

Commit

Permalink
bootstrap: make copying linker binaries conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
P1n3appl3 committed Oct 2, 2023
1 parent 5333b87 commit a9a8468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ impl Step for Std {
// The LLD wrappers and `rust-lld` are self-contained linking components that can be
// necessary to link the stdlib on some targets. We'll also need to copy these binaries to
// the `stage0-sysroot` to ensure the linker is found when bootstrapping on such a target.
if compiler.stage == 0 && compiler.host == builder.config.build {
if compiler.stage == 0 && compiler.host == builder.config.build && builder.config.use_lld {
// We want to copy the host `bin` folder within the `rustlib` folder in the sysroot.
let src_sysroot_bin = builder
.rustc_snapshot_sysroot()
.join("lib")
.join("rustlib")
.join(&compiler.host.triple)
.join(compiler.host.triple)
.join("bin");
let target_sysroot_bin =
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
Expand Down

0 comments on commit a9a8468

Please sign in to comment.