]> git.lizzy.rs Git - rust.git/commitdiff
no -Bsymbolic for mac; no static-libstdc++ for windows
authorJorge Aparicio <jorge@japaric.io>
Wed, 20 Jun 2018 22:48:04 +0000 (17:48 -0500)
committerJorge Aparicio <jorge@japaric.io>
Wed, 20 Jun 2018 22:48:04 +0000 (17:48 -0500)
src/bootstrap/native.rs

index c3f84378adfb23b8b4247a55f41fdb392dad1f8f..7dcdbe9c931cf23984fa9816759f51ddac79b098 100644 (file)
@@ -176,7 +176,13 @@ fn run(self, builder: &Builder) -> PathBuf {
 
         // 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") {