]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_llvm/build.rs
Rollup merge of #99192 - Amanieu:fix-asm-srcloc, r=petrochenkov
[rust.git] / compiler / rustc_llvm / build.rs
index ac758c15cca7875fce627f5f92879c881d258307..7729ec6bef4a7409eff955dc96b90e90524fcf4a 100644 (file)
@@ -324,9 +324,10 @@ fn main() {
 
     let stdcppname = if target.contains("openbsd") {
         if target.contains("sparc64") { "estdc++" } else { "c++" }
-    } else if target.contains("freebsd") {
-        "c++"
-    } else if target.contains("darwin") {
+    } else if target.contains("darwin")
+        || target.contains("freebsd")
+        || target.contains("windows-gnullvm")
+    {
         "c++"
     } else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
         // NetBSD uses a separate library when relocation is required
@@ -365,7 +366,7 @@ fn main() {
 
     // Libstdc++ depends on pthread which Rust doesn't link on MinGW
     // since nothing else requires it.
-    if target.contains("windows-gnu") {
+    if target.ends_with("windows-gnu") {
         println!("cargo:rustc-link-lib=static:-bundle=pthread");
     }
 }