about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2025-06-11 18:37:48 +0200
committerUrgau <urgau@numericable.fr>2025-06-15 17:20:08 +0200
commit268fbfed477a20cb7efa04b8c28982f46f16a4a4 (patch)
treea11c050fdb31f916e22f8d11cc65e3a47ee72a36 /src/tools
parent810d99e7b5116ba00dd2e8da872ccead0b06f4ef (diff)
downloadrust-268fbfed477a20cb7efa04b8c28982f46f16a4a4.tar.gz
rust-268fbfed477a20cb7efa04b8c28982f46f16a4a4.zip
Un-remap `rustc-dev` component paths
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/runtest.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 75f24adb70f..9edcba5d460 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2371,6 +2371,12 @@ impl<'test> TestCx<'test> {
         let rust_src_dir = rust_src_dir.read_link_utf8().unwrap_or(rust_src_dir.to_path_buf());
         normalize_path(&rust_src_dir.join("library"), "$SRC_DIR_REAL");
 
+        // Real paths into the compiler
+        let rustc_src_dir = &self.config.sysroot_base.join("lib/rustlib/rustc-src/rust");
+        rustc_src_dir.try_exists().expect(&*format!("{} should exists", rustc_src_dir));
+        let rustc_src_dir = rustc_src_dir.read_link_utf8().unwrap_or(rustc_src_dir.to_path_buf());
+        normalize_path(&rustc_src_dir.join("compiler"), "$COMPILER_DIR_REAL");
+
         // eg.
         // /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui/<test_dir>/$name.$revision.$mode/
         normalize_path(&self.output_base_dir(), "$TEST_BUILD_DIR");