about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-06-07 20:14:32 +0200
committerGitHub <noreply@github.com>2024-06-07 20:14:32 +0200
commitb8e28d1426f00e27ae525fc784f5cc104eca5a69 (patch)
tree4babce5457262b8827f03356556be4eedd67d5e3 /src
parentccbd6c29b49b33f15793f898a1c8173d33105fbc (diff)
parenteac63b77257d69d2a89a50f165ac58971689a31d (diff)
downloadrust-b8e28d1426f00e27ae525fc784f5cc104eca5a69.tar.gz
rust-b8e28d1426f00e27ae525fc784f5cc104eca5a69.zip
Rollup merge of #126112 - Kobzol:runmake-source-root, r=jieyouxu
Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: https://github.com/rust-lang/rust/issues/126071

r? ```@jieyouxu```
Diffstat (limited to 'src')
-rw-r--r--src/tools/compiletest/src/runtest.rs3
-rw-r--r--src/tools/run-make-support/src/lib.rs2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 2c425a07b2a..41972b6994c 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -3515,7 +3515,6 @@ impl<'test> TestCx<'test> {
             .arg(&self.testpaths.file.join("rmake.rs"))
             .env("TARGET", &self.config.target)
             .env("PYTHON", &self.config.python)
-            .env("S", &src_root)
             .env("RUST_BUILD_STAGE", &self.config.stage_id)
             .env("RUSTC", cwd.join(&self.config.rustc_path))
             .env("TMPDIR", &rmake_out_dir)
@@ -3567,7 +3566,7 @@ impl<'test> TestCx<'test> {
             .env(dylib_env_var(), &dylib_env_paths)
             .env("TARGET", &self.config.target)
             .env("PYTHON", &self.config.python)
-            .env("S", &src_root)
+            .env("SOURCE_ROOT", &src_root)
             .env("RUST_BUILD_STAGE", &self.config.stage_id)
             .env("RUSTC", cwd.join(&self.config.rustc_path))
             .env("TMPDIR", &rmake_out_dir)
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index d74a0272a62..0f9d5a3b6c3 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -89,7 +89,7 @@ pub fn htmldocck() -> Command {
 
 /// Path to the root rust-lang/rust source checkout.
 pub fn source_root() -> PathBuf {
-    env_var("S").into()
+    env_var("SOURCE_ROOT").into()
 }
 
 /// Construct the static library name based on the platform.