From 1b3a27a37f7c2c98d7448bb25e84bbd0b2479bbf Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 24 Mar 2022 10:16:02 +0300 Subject: [PATCH] rustbuild: Fix LLVM build with LLD on windows-gnu targets --- src/bootstrap/native.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index a810a57feb7bb..6d7ca9a94cfbd 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -568,7 +568,7 @@ fn configure_cmake( // We also do this if the user explicitly requested static libstdc++. if builder.config.llvm_static_stdcpp { if !target.contains("msvc") && !target.contains("netbsd") { - if target.contains("apple") { + if target.contains("apple") || target.contains("windows") { ldflags.push_all("-static-libstdc++"); } else { ldflags.push_all("-Wl,-Bsymbolic -static-libstdc++");