From 3d50aee2ca26e6b23601dca1e19399c547205e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sat, 30 Sep 2023 20:36:46 +0200 Subject: [PATCH] Fix passing of LLD threads flag --- src/bootstrap/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 0bc58ae5d450..e212397ba407 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1302,7 +1302,7 @@ impl Build { // If we use an external LLD, we don't know if it's new enough to support the required // threads flag. Therefore we invoke it to find it out. // The self-contained lld should always be new enough. - if test { + if test && matches!(self.config.lld_mode, LldMode::External) { let flag = self.lld_single_thread_flag(target); flags.push(format!("-Clink-arg=-Wl,{flag}")); }