about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-07-19 09:44:22 +0000
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-07-19 14:04:58 +0000
commit9f2a660f86bc88112445cea38bcd22e0f30cbd89 (patch)
treef4d19139a558ed7d47af6395125930ead866e620 /src
parent49ca9ff0ac892acf6aee695ee3c6f4d7c412eaea (diff)
downloadrust-9f2a660f86bc88112445cea38bcd22e0f30cbd89.tar.gz
rust-9f2a660f86bc88112445cea38bcd22e0f30cbd89.zip
compiletest/rmake: cleanup library search paths
Diffstat (limited to 'src')
-rw-r--r--src/tools/compiletest/src/runtest.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 07ffbc2e9dc..a38a900b3d8 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -3582,14 +3582,15 @@ impl<'test> TestCx<'test> {
         };
         debug!(?support_lib_deps_deps);
 
-        // FIXME(jieyouxu): explain what the hecc we are doing here.
+        // To compile the recipe with rustc, we need to provide suitable dynamic library search
+        // paths to rustc. This includes both:
+        // 1. The "base" dylib search paths that was provided to compiletest, e.g. `LD_LIBRARY_PATH`
+        //    on some linux distros.
+        // 2. Specific library paths in `self.config.compile_lib_path` needed for running rustc.
 
-        // This is the base dynamic library search paths that was made available to compiletest.
         let base_dylib_search_paths =
             Vec::from_iter(env::split_paths(&env::var(dylib_env_var()).unwrap()));
 
-        // We add in `self.config.compile_lib_path` which are the libraries needed to run the
-        // host compiler.
         let host_dylib_search_paths = {
             let mut paths = vec![self.config.compile_lib_path.clone()];
             paths.extend(base_dylib_search_paths.iter().cloned());