Skip to content

Commit

Permalink
rustbuild: Build tests with LLD if use-lld = true was passed (non-m…
Browse files Browse the repository at this point in the history
…svc)
  • Loading branch information
petrochenkov committed Sep 6, 2020
1 parent 77d11c3 commit 8e6b563
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,10 +1067,16 @@ impl Step for Compiletest {

let mut hostflags = flags.clone();
hostflags.push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display()));
if builder.config.use_lld && !compiler.host.triple.contains("msvc") {
hostflags.push("-Clink-args=-fuse-ld=lld".to_string());
}
cmd.arg("--host-rustcflags").arg(hostflags.join(" "));

let mut targetflags = flags;
targetflags.push(format!("-Lnative={}", builder.test_helpers_out(target).display()));
if builder.config.use_lld && !target.contains("msvc") {
targetflags.push("-Clink-args=-fuse-ld=lld".to_string());
}
cmd.arg("--target-rustcflags").arg(targetflags.join(" "));

cmd.arg("--docck-python").arg(builder.python());
Expand Down

0 comments on commit 8e6b563

Please sign in to comment.