Skip to content

Commit a9a8468

Browse files
committed
bootstrap: make copying linker binaries conditional
1 parent 5333b87 commit a9a8468

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/compile.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ impl Step for Std {
161161
// The LLD wrappers and `rust-lld` are self-contained linking components that can be
162162
// necessary to link the stdlib on some targets. We'll also need to copy these binaries to
163163
// the `stage0-sysroot` to ensure the linker is found when bootstrapping on such a target.
164-
if compiler.stage == 0 && compiler.host == builder.config.build {
164+
if compiler.stage == 0 && compiler.host == builder.config.build && builder.config.use_lld {
165165
// We want to copy the host `bin` folder within the `rustlib` folder in the sysroot.
166166
let src_sysroot_bin = builder
167167
.rustc_snapshot_sysroot()
168168
.join("lib")
169169
.join("rustlib")
170-
.join(&compiler.host.triple)
170+
.join(compiler.host.triple)
171171
.join("bin");
172172
let target_sysroot_bin =
173173
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");

0 commit comments

Comments
 (0)