Skip to content

Commit

Permalink
Auto merge of #76326 - mati865:use_lld-no-linker, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix rust.use-lld when linker is not set

Fixes #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
bors committed Sep 6, 2020
2 parents 94b8eb8 + a2fbf39 commit b40abfd
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 b40abfd

Please sign in to comment.