about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-09 05:49:31 +0000
committerbors <bors@rust-lang.org>2017-04-09 05:49:31 +0000
commitcff81da514068ea89e06d1a62357971d34094ea3 (patch)
tree5427ec7236652dd5f8210dd3ee19b80340550152
parentc2d186a3c9c651b408f95b2158a011678b4910c8 (diff)
parentaeab73c9388effe1295cd9c844393613633f5f5b (diff)
downloadrust-cff81da514068ea89e06d1a62357971d34094ea3.tar.gz
rust-cff81da514068ea89e06d1a62357971d34094ea3.zip
Auto merge of #41163 - nagisa:ldflags-llvm-config, r=alexcrichton
Specify type libraries for llvm-config --ldflags

This matters on systems where static libraries and dynamic libraries reside in
different location
-rw-r--r--src/librustc_llvm/build.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
index 7d5887e699f..a8def4bafd8 100644
--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -217,6 +217,9 @@ fn main() {
     // hack around this by replacing the host triple with the target and pray
     // that those -L directories are the same!
     let mut cmd = Command::new(&llvm_config);
+    if let Some(link_arg) = llvm_link_arg {
+        cmd.arg(link_arg);
+    }
     cmd.arg("--ldflags");
     for lib in output(&mut cmd).split_whitespace() {
         if lib.starts_with("-LIBPATH:") {