about summary refs log tree commit diff
path: root/src/bootstrap/native.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2018-04-30 10:15:48 +0200
committerJorge Aparicio <jorge@japaric.io>2018-06-03 18:23:01 +0200
commit5e577b8aee60b7ee2394a50d8eec8a3b26541d11 (patch)
tree0a55efe8512a2fd5c987f727bbe852ff8815224b /src/bootstrap/native.rs
parent7d576f25fcb0b0ea1e4d442329a4949765fa02f0 (diff)
downloadrust-5e577b8aee60b7ee2394a50d8eec8a3b26541d11.tar.gz
rust-5e577b8aee60b7ee2394a50d8eec8a3b26541d11.zip
ship LLVM tools with the toolchain
Diffstat (limited to 'src/bootstrap/native.rs')
-rw-r--r--src/bootstrap/native.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 93292c658ba..2f6af1e0640 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -167,8 +167,11 @@ impl Step for Llvm {
         // which saves both memory during parallel links and overall disk space
         // for the tools.  We don't distribute any of those tools, so this is
         // just a local concern.  However, it doesn't work well everywhere.
-        if target.contains("linux-gnu") || target.contains("apple-darwin") {
-           cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
+        //
+        // If we are shipping llvm tools then we statically link them LLVM
+        if (target.contains("linux-gnu") || target.contains("apple-darwin")) &&
+            !builder.config.ship_llvm_tools  {
+                cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
         }
 
         if target.contains("msvc") {