about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2025-05-01 19:17:56 +0000
committeronur-ozkan <work@onurozkan.dev>2025-05-01 19:32:44 +0000
commit7b25d4a99edc12909dc73c31cb6a44238c4b9bf9 (patch)
treef215f5e5ecbb983d3b8817a0448d6b48e79ba0de
parent6e23095adf9209614a45f7f75fea36dad7b92afb (diff)
downloadrust-7b25d4a99edc12909dc73c31cb6a44238c4b9bf9.tar.gz
rust-7b25d4a99edc12909dc73c31cb6a44238c4b9bf9.zip
extend the list of registered dylibs on `test::prepare_cargo_test`
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index d4fccc535a6..a7a3b5a878c 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -2556,9 +2556,9 @@ fn prepare_cargo_test(
     // We skip everything on Miri as then this overwrites the libdir set up
     // by `Cargo::new` and that actually makes things go wrong.
     if builder.kind != Kind::Miri {
-        let mut dylib_path = dylib_path();
-        dylib_path.insert(0, PathBuf::from(&*builder.sysroot_target_libdir(compiler, target)));
-        cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
+        let mut dylib_paths = builder.rustc_lib_paths(compiler);
+        dylib_paths.push(PathBuf::from(&builder.sysroot_target_libdir(compiler, target)));
+        helpers::add_dylib_path(dylib_paths, &mut cargo);
     }
 
     if builder.remote_tested(target) {