Skip to content

Commit

Permalink
Rollup merge of rust-lang#76326 - mati865:use_lld-no-linker, r=Mark-S…
Browse files Browse the repository at this point in the history
…imulacrum

Fix rust.use-lld when linker is not set

Fixes rust-lang#76127 (comment)

Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.
  • Loading branch information
Dylan-DPC committed Sep 5, 2020
2 parents 055815b + a2fbf39 commit 16e7251
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,12 @@ impl Build {
&& !target.contains("msvc")
{
Some(self.cc(target))
} else if can_use_lld && self.config.use_lld && self.build == target {
} else if target.contains("msvc")
&& can_use_lld
&& self.config.use_lld
&& self.build == target
{
// Currently we support using LLD directly via `rust.use_lld` option only with MSVC
Some(&self.initial_lld)
} else {
None
Expand Down

0 comments on commit 16e7251

Please sign in to comment.