about summary refs log tree commit diff
path: root/src/bootstrap/native.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2018-06-20 17:48:04 -0500
committerJorge Aparicio <jorge@japaric.io>2018-06-20 17:48:04 -0500
commit9a96876d2d1f8e2a4ca066f132c4b6ddec1b94ff (patch)
tree3cbf9f0a02a92590fd55b24c2dd8580bdce9641e /src/bootstrap/native.rs
parent7458af99e922036440648a157ade4899f23dd4a3 (diff)
downloadrust-9a96876d2d1f8e2a4ca066f132c4b6ddec1b94ff.tar.gz
rust-9a96876d2d1f8e2a4ca066f132c4b6ddec1b94ff.zip
no -Bsymbolic for mac; no static-libstdc++ for windows
Diffstat (limited to 'src/bootstrap/native.rs')
-rw-r--r--src/bootstrap/native.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index c3f84378adf..7dcdbe9c931 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -176,7 +176,13 @@ impl Step for Llvm {
 
         // For distribution we want the LLVM tools to be *statically* linked to libstdc++
         if builder.config.llvm_tools_enabled {
-            cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-Bsymbolic -static-libstdc++");
+            if !target.contains("windows") {
+                if target.contains("apple") {
+                    cfg.define("CMAKE_EXE_LINKER_FLAGS", "-static-libstdc++");
+                } else {
+                    cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-Bsymbolic -static-libstdc++");
+                }
+            }
         }
 
         if target.contains("msvc") {