Skip to content

Commit bfb8f73

Browse files
authored
Rollup merge of #140563 - onur-ozkan:extend-dylib-paths, r=jieyouxu
extend the list of registered dylibs on `test::prepare_cargo_test` self-explanatory Fixes #140299
2 parents 15f21f4 + 7b25d4a commit bfb8f73

File tree

1 file changed

+3
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-3
lines changed

src/bootstrap/src/core/build_steps/test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2556,9 +2556,9 @@ fn prepare_cargo_test(
25562556
// We skip everything on Miri as then this overwrites the libdir set up
25572557
// by `Cargo::new` and that actually makes things go wrong.
25582558
if builder.kind != Kind::Miri {
2559-
let mut dylib_path = dylib_path();
2560-
dylib_path.insert(0, PathBuf::from(&*builder.sysroot_target_libdir(compiler, target)));
2561-
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
2559+
let mut dylib_paths = builder.rustc_lib_paths(compiler);
2560+
dylib_paths.push(PathBuf::from(&builder.sysroot_target_libdir(compiler, target)));
2561+
helpers::add_dylib_path(dylib_paths, &mut cargo);
25622562
}
25632563

25642564
if builder.remote_tested(target) {

0 commit comments

Comments
 (0)