提交 8e6b563b 编写于 作者: V Vadim Petrochenkov

rustbuild: Build tests with LLD if `use-lld = true` was passed (non-msvc)

上级 77d11c3c
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册