Skip to content

Commit

Permalink
Rollup merge of rust-lang#76127 - petrochenkov:lld, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
rustbuild: Remove one LLD workaround

The version of LLD shipped with Rust no longer have this issue.

Closes rust-lang#68647
  • Loading branch information
matklad authored Aug 31, 2020
2 parents d8eb301 + 21c624a commit 9caf08f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,15 +1041,11 @@ impl<'a> Builder<'a> {
}
}

// FIXME: Don't use LLD with MSVC if we're compiling libtest, since it fails to link it.
// See https://github.com/rust-lang/rust/issues/68647.
let can_use_lld = mode != Mode::Std;

if let Some(host_linker) = self.linker(compiler.host, can_use_lld) {
if let Some(host_linker) = self.linker(compiler.host, true) {
cargo.env("RUSTC_HOST_LINKER", host_linker);
}

if let Some(target_linker) = self.linker(target, can_use_lld) {
if let Some(target_linker) = self.linker(target, true) {
let target = crate::envify(&target.triple);
cargo.env(&format!("CARGO_TARGET_{}_LINKER", target), target_linker);
}
Expand Down

0 comments on commit 9caf08f

Please sign in to comment.