about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2020-09-10 10:17:32 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2020-09-20 16:39:13 -0400
commit1aac99de25d3e28e4b2a16e8fbe6737d5202f27a (patch)
tree006014054b12b93ae6d5098417681f5aea09162f /src/bootstrap
parenta625ab77e87b31ac6689e97f2f10cb09773bed38 (diff)
downloadrust-1aac99de25d3e28e4b2a16e8fbe6737d5202f27a.tar.gz
rust-1aac99de25d3e28e4b2a16e8fbe6737d5202f27a.zip
Provide bootstrap tools with RUSTC in environment
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/test.rs2
-rw-r--r--src/bootstrap/tool.rs4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index dc28b8ece24..a9a8d3783fd 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1281,6 +1281,8 @@ impl Step for Compiletest {
             cmd.arg("--rustfix-coverage");
         }
 
+        cmd.env("BOOTSTRAP_CARGO", &builder.initial_cargo);
+
         builder.ci_env.force_coloring_in_ci(&mut cmd);
 
         builder.info(&format!(
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 5d66632d92c..460dffb5c8a 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -700,6 +700,10 @@ impl<'a> Builder<'a> {
         }
 
         add_dylib_path(lib_paths, &mut cmd);
+
+        // Provide a RUSTC for this command to use.
+        cmd.env("RUSTC", &self.initial_rustc);
+
         cmd
     }
 }