Skip to content

Commit 18b785e

Browse files
authored
Rollup merge of rust-lang#76326 - mati865:use_lld-no-linker, r=Mark-Simulacrum
Fix rust.use-lld when linker is not set Fixes rust-lang#76127 (comment) Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.
2 parents 9310922 + a2fbf39 commit 18b785e

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)