Fix rust.use-lld when linker is not set

This commit is contained in:
Mateusz Mikuła
2020-09-04 15:20:13 +02:00
parent 4ffb5c5954
commit a2fbf39cc8
+6 -1
View File
@@ -863,7 +863,12 @@ fn linker(&self, target: TargetSelection, can_use_lld: bool) -> Option<&Path> {
&& !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