diff options
| author | bors <bors@rust-lang.org> | 2020-09-06 04:00:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-06 04:00:56 +0000 |
| commit | b40abfd4854ec7323a2b6d39356fca2363ed5631 (patch) | |
| tree | 5b98a9d2159ab2dfd518aabde1021e883569b802 /src | |
| parent | 94b8eb80abf68d7505aca3562a625ec00fa394a1 (diff) | |
| parent | a2fbf39cc8b619ac5b469afd43d0ff8b520511aa (diff) | |
| download | rust-b40abfd4854ec7323a2b6d39356fca2363ed5631.tar.gz rust-b40abfd4854ec7323a2b6d39356fca2363ed5631.zip | |
Auto merge of #76326 - mati865:use_lld-no-linker, r=Mark-Simulacrum
Fix rust.use-lld when linker is not set Fixes https://github.com/rust-lang/rust/pull/76127#issuecomment-685419195 Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 54651214363..1b655f55fb0 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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 |
