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.
This commit is contained in:
commit
b40abfd485
|
@ -863,7 +863,12 @@ impl Build {
|
||||||
&& !target.contains("msvc")
|
&& !target.contains("msvc")
|
||||||
{
|
{
|
||||||
Some(self.cc(target))
|
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)
|
Some(&self.initial_lld)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in New Issue