]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/lib.rs
check lld version to choose correct flag for tests
[rust.git] / src / bootstrap / lib.rs
index 7e70e99bb8ca22ee78d1d78170cd2736e736bab4..f5def8ba8341f58b817afaedb9828e75a6ad0ff7 100644 (file)
@@ -1152,8 +1152,8 @@ fn lld_flags(&self, target: TargetSelection) -> impl Iterator<Item = String> {
                 options[0] = Some("-Clink-arg=-fuse-ld=lld".to_string());
             }
 
-            let threads = if target.contains("windows") { "/threads:1" } else { "--threads=1" };
-            options[1] = Some(format!("-Clink-arg=-Wl,{}", threads));
+            let no_threads = util::lld_flag_no_threads(target.contains("windows"));
+            options[1] = Some(format!("-Clink-arg=-Wl,{}", no_threads));
         }
 
         IntoIterator::into_iter(options).flatten()