Skip to content

Commit

Permalink
Rollup merge of rust-lang#86740 - 1000teslas:issue-71519-fix, r=petro…
Browse files Browse the repository at this point in the history
…chenkov

copy rust-lld as ld in dist

Fixes bug in rust-lang#85961. Linking seems to work for pure Rust projects, but not when a C library needs to be dynamically linked.
  • Loading branch information
JohnTitor authored Jun 30, 2021
2 parents dfe05c0 + fe822fe commit e52a0ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ impl Step for Rustc {

// Copy over lld if it's there
if builder.config.lld_enabled {
let exe = exe("rust-lld", compiler.host);
builder.copy(&src_dir.join(&exe), &dst_dir.join(&exe));
let rust_lld = exe("rust-lld", compiler.host);
builder.copy(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld));
// for `-Z gcc-ld=lld`
let gcc_lld_dir = dst_dir.join("gcc-ld");
t!(fs::create_dir(&gcc_lld_dir));
builder.copy(&src_dir.join(&exe), &gcc_lld_dir.join(&exe));
builder.copy(&src_dir.join(&rust_lld), &gcc_lld_dir.join(exe("ld", compiler.host)));
}

// Copy over llvm-dwp if it's there
Expand Down

0 comments on commit e52a0ec

Please sign in to comment.