about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMateusz Mikuła <mati865@gmail.com>2020-09-04 15:20:13 +0200
committerMateusz Mikuła <mati865@gmail.com>2020-09-04 15:31:53 +0200
commita2fbf39cc8b619ac5b469afd43d0ff8b520511aa (patch)
tree4fbf9acfbbec00d65225cd674e2336e9269dd4cd
parent4ffb5c5954a304daf47a567b34e74e421db86d98 (diff)
downloadrust-a2fbf39cc8b619ac5b469afd43d0ff8b520511aa.tar.gz
rust-a2fbf39cc8b619ac5b469afd43d0ff8b520511aa.zip
Fix rust.use-lld when linker is not set
-rw-r--r--src/bootstrap/lib.rs7
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