Skip to content

Commit a2fbf39

Browse files
committed
Fix rust.use-lld when linker is not set
1 parent 4ffb5c5 commit a2fbf39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,12 @@ impl Build {
863863
&& !target.contains("msvc")
864864
{
865865
Some(self.cc(target))
866-
} else if can_use_lld && self.config.use_lld && self.build == target {
866+
} else if target.contains("msvc")
867+
&& can_use_lld
868+
&& self.config.use_lld
869+
&& self.build == target
870+
{
871+
// Currently we support using LLD directly via `rust.use_lld` option only with MSVC
867872
Some(&self.initial_lld)
868873
} else {
869874
None

0 commit comments

Comments
 (0)