提交 7acead5e 编写于 作者: M Michael Woerister

Add local LLD to the PATH for run-make-fulldeps tests.

上级 c95f5e31
......@@ -1238,6 +1238,21 @@ fn run(self, builder: &Builder<'_>) {
.expect("Expected llvm-config to be contained in directory");
assert!(llvm_bin_path.is_dir());
cmd.arg("--llvm-bin-dir").arg(llvm_bin_path);
// If LLD is available, add it to the PATH
if builder.config.lld_enabled {
let lld_install_root = builder.ensure(native::Lld {
target: builder.config.build,
});
let lld_bin_path = lld_install_root.join("bin");
let old_path = env::var_os("PATH").unwrap_or_default();
let new_path = env::join_paths(std::iter::once(lld_bin_path)
.chain(env::split_paths(&old_path)))
.expect("Could not add LLD bin path to PATH");
cmd.env("PATH", new_path);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册