about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-17 20:11:03 +0000
committerbors <bors@rust-lang.org>2022-06-17 20:11:03 +0000
commitc3b7d7b496b5536bb0a3d501222d2d0a8b54a69e (patch)
tree0d52f53bfb39cd8414d312aad23c8d713665dccd
parent0cb9899e780bcefb9008088c1e6d6cd5fe2593b4 (diff)
parent6f0d6149366dc827ca064f96093cc445c22106f0 (diff)
downloadrust-c3b7d7b496b5536bb0a3d501222d2d0a8b54a69e.tar.gz
rust-c3b7d7b496b5536bb0a3d501222d2d0a8b54a69e.zip
Auto merge of #98081 - gco:no_static_libcpp, r=jyn514
Do not try to statically link libstdc++ on Solaris

Fixes #97260
-rw-r--r--src/bootstrap/compile.rs1
-rw-r--r--src/bootstrap/native.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 9958fc26be7..b4807d1ab3a 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -730,6 +730,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetS
             && !target.contains("freebsd")
             && !target.contains("msvc")
             && !target.contains("apple")
+            && !target.contains("solaris")
         {
             let file = compiler_file(
                 builder,
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index e23498873f3..18f82d024f8 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -655,7 +655,7 @@ fn configure_cmake(
     // For distribution we want the LLVM tools to be *statically* linked to libstdc++.
     // 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("msvc") && !target.contains("netbsd") && !target.contains("solaris") {
             if target.contains("apple") || target.contains("windows") {
                 ldflags.push_all("-static-libstdc++");
             } else {