Skip to content

Commit e6a9bb1

Browse files
authored
Rollup merge of #116365 - P1n3appl3:master, r=onur-ozkan
bootstrap: make copying linker binaries conditional The change in #116276 breaks bootstrapping if you don't use `lld` for linking with your stage0 compiler. Making this copy conditional should be enough to fix it.
2 parents 0363cc5 + f55c879 commit e6a9bb1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/bootstrap/compile.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ impl Step for Std {
167167
.rustc_snapshot_sysroot()
168168
.join("lib")
169169
.join("rustlib")
170-
.join(&compiler.host.triple)
170+
.join(compiler.host.triple)
171171
.join("bin");
172-
let target_sysroot_bin =
173-
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
174-
t!(fs::create_dir_all(&target_sysroot_bin));
175-
builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
172+
if src_sysroot_bin.exists() {
173+
let target_sysroot_bin =
174+
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
175+
t!(fs::create_dir_all(&target_sysroot_bin));
176+
builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
177+
}
176178
}
177179

178180
let mut cargo = builder.cargo(compiler, Mode::Std, SourceType::InTree, target, "build");

0 commit comments

Comments
 (0)