Skip to content

Commit f76a86d

Browse files
committed
compiletest/rmake: cleanup library search paths
1 parent 8bfa560 commit f76a86d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3579,14 +3579,15 @@ impl<'test> TestCx<'test> {
35793579
};
35803580
debug!(?support_lib_deps_deps);
35813581

3582-
// FIXME(jieyouxu): explain what the hecc we are doing here.
3582+
// To compile the recipe with rustc, we need to provide suitable dynamic library search
3583+
// paths to rustc. This includes both:
3584+
// 1. The "base" dylib search paths that was provided to compiletest, e.g. `LD_LIBRARY_PATH`
3585+
// on some linux distros.
3586+
// 2. Specific library paths in `self.config.compile_lib_path` needed for running rustc.
35833587

3584-
// This is the base dynamic library search paths that was made available to compiletest.
35853588
let base_dylib_search_paths =
35863589
Vec::from_iter(env::split_paths(&env::var(dylib_env_var()).unwrap()));
35873590

3588-
// We add in `self.config.compile_lib_path` which are the libraries needed to run the
3589-
// host compiler.
35903591
let host_dylib_search_paths = {
35913592
let mut paths = vec![self.config.compile_lib_path.clone()];
35923593
paths.extend(base_dylib_search_paths.iter().cloned());

0 commit comments

Comments
 (0)