mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
Fix rust.use-lld when linker is not set
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user