about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2018-05-01 06:34:24 +0200
committerJorge Aparicio <jorge@japaric.io>2018-06-03 18:23:01 +0200
commit8e673073f349f9b7cadaf809f8b88a2bfd296769 (patch)
tree818640339bd67fbf6699c0e6859c37e7e2388510
parenta1ef529703172a1eb432782b3494512b74af6b07 (diff)
downloadrust-8e673073f349f9b7cadaf809f8b88a2bfd296769.tar.gz
rust-8e673073f349f9b7cadaf809f8b88a2bfd296769.zip
statically link the tools to libstdc++
-rw-r--r--src/bootstrap/native.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 2f6af1e0640..74083360aca 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -174,6 +174,11 @@ impl Step for Llvm {
                 cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
         }
 
+        // For distribution we want the LLVM tools to be *statically* linked to libstdc++
+        if builder.config.ship_llvm_tools {
+            cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-Bsymbolic -static-libstdc++");
+        }
+
         if target.contains("msvc") {
             cfg.define("LLVM_USE_CRT_DEBUG", "MT");
             cfg.define("LLVM_USE_CRT_RELEASE", "MT");