Skip to content

Commit cff81da

Browse files
committed
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
2 parents c2d186a + aeab73c commit cff81da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_llvm/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ fn main() {
217217
// hack around this by replacing the host triple with the target and pray
218218
// that those -L directories are the same!
219219
let mut cmd = Command::new(&llvm_config);
220+
if let Some(link_arg) = llvm_link_arg {
221+
cmd.arg(link_arg);
222+
}
220223
cmd.arg("--ldflags");
221224
for lib in output(&mut cmd).split_whitespace() {
222225
if lib.starts_with("-LIBPATH:") {

0 commit comments

Comments
 (0)