We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c95f5e3 commit 7acead5Copy full SHA for 7acead5
src/bootstrap/test.rs
@@ -1238,6 +1238,21 @@ impl Step for Compiletest {
1238
.expect("Expected llvm-config to be contained in directory");
1239
assert!(llvm_bin_path.is_dir());
1240
cmd.arg("--llvm-bin-dir").arg(llvm_bin_path);
1241
+
1242
+ // If LLD is available, add it to the PATH
1243
+ if builder.config.lld_enabled {
1244
+ let lld_install_root = builder.ensure(native::Lld {
1245
+ target: builder.config.build,
1246
+ });
1247
1248
+ let lld_bin_path = lld_install_root.join("bin");
1249
1250
+ let old_path = env::var_os("PATH").unwrap_or_default();
1251
+ let new_path = env::join_paths(std::iter::once(lld_bin_path)
1252
+ .chain(env::split_paths(&old_path)))
1253
+ .expect("Could not add LLD bin path to PATH");
1254
+ cmd.env("PATH", new_path);
1255
+ }
1256
}
1257
1258
0 commit comments