rustbuild: Build tests with LLD if use-lld = true
was passed (non-msvc)
This commit is contained in:
parent
77d11c3ce2
commit
8e6b563b93
@ -1067,10 +1067,16 @@ fn run(self, builder: &Builder<'_>) {
|
||||
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user