summary refs log tree commit diff
path: root/src/bootstrap/native.rs
diff options
context:
space:
mode:
authorRobin Kruppe <robin.kruppe@gmail.com>2017-03-05 16:11:11 +0100
committerRobin Kruppe <robin.kruppe@gmail.com>2017-03-09 15:07:42 +0100
commit58ff4f67e3a1d099d3c4cb8ccb554ee9fd0a16cd (patch)
treeac7f8e861aaf3a04b56922f8d94e6645cd5ee856 /src/bootstrap/native.rs
parent3087a1f39eaeac9d76c8b159dcc64de515bb2b83 (diff)
downloadrust-58ff4f67e3a1d099d3c4cb8ccb554ee9fd0a16cd.tar.gz
rust-58ff4f67e3a1d099d3c4cb8ccb554ee9fd0a16cd.zip
rustbuild: expose LLVM_PARALLEL_LINK_JOBS
This allows limiting the number of linker jobs to avoid swapping when
linking LLVM with debug info.
Diffstat (limited to 'src/bootstrap/native.rs')
-rw-r--r--src/bootstrap/native.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 483f45fdd62..c13235b9c76 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -115,6 +115,12 @@ pub fn llvm(build: &Build, target: &str) {
         cfg.define("LLVM_BUILD_32_BITS", "ON");
     }
 
+    if let Some(num_linkers) = build.config.llvm_link_jobs {
+        if num_linkers > 0 {
+            cfg.define("LLVM_PARALLEL_LINK_JOBS", num_linkers.to_string());
+        }
+    }
+
     // http://llvm.org/docs/HowToCrossCompileLLVM.html
     if target != build.config.build {
         // FIXME: if the llvm root for the build triple is overridden then we