Skip to content

Commit

Permalink
Unrolled build for rust-lang#116365
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#116365 - P1n3appl3:master, r=onur-ozkan

bootstrap: make copying linker binaries conditional

The change in rust-lang#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.
  • Loading branch information
rust-timer committed Oct 4, 2023
2 parents 4910642 + f55c879 commit 7d5a8ed
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ impl Step for Std {
.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");
t!(fs::create_dir_all(&target_sysroot_bin));
builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
if src_sysroot_bin.exists() {
let target_sysroot_bin =
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
t!(fs::create_dir_all(&target_sysroot_bin));
builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
}
}

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

0 comments on commit 7d5a8ed

Please sign in to comment.