diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 5257575a94e8b..3a8ec7b87558d 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -128,7 +128,7 @@ fn main() { // we don't pick up system libs because unfortunately they're for the host // of llvm-config, not the target that we're attempting to link. let mut cmd = Command::new(&llvm_config); - cmd.arg("--libs"); + cmd.args(&["--libs", "--link-static"]); if !is_crossed { cmd.arg("--system-libs"); }