about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-27 21:46:35 +0100
committerGitHub <noreply@github.com>2022-02-27 21:46:35 +0100
commit736dae2f71370c6c1ad04d8b2c6d97484cd02f33 (patch)
tree92b2a996b37e8595ccd941197c440f4ea47cc260
parent19958c2d096c272f543a140aeadf37f6b63329ee (diff)
parent35e3aaf8d87180b7b11568d7bd49b832d7fb63d8 (diff)
downloadrust-736dae2f71370c6c1ad04d8b2c6d97484cd02f33.tar.gz
rust-736dae2f71370c6c1ad04d8b2c6d97484cd02f33.zip
Rollup merge of #94409 - RalfJung:path, r=Mark-Simulacrum
avoid rebuilding bootstrap when PATH changes

Fixes https://github.com/rust-lang/rust/issues/94408

r? ```@Mark-Simulacrum```
-rw-r--r--src/bootstrap/build.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/build.rs b/src/bootstrap/build.rs
index 6e39ea00f80..8a5bf933d56 100644
--- a/src/bootstrap/build.rs
+++ b/src/bootstrap/build.rs
@@ -4,13 +4,13 @@ use std::path::PathBuf;
 fn main() {
     println!("cargo:rerun-if-changed=build.rs");
     println!("cargo:rerun-if-env-changed=RUSTC");
-    println!("cargo:rerun-if-env-changed=PATH");
     println!("cargo:rustc-env=BUILD_TRIPLE={}", env::var("HOST").unwrap());
 
     // This may not be a canonicalized path.
     let mut rustc = PathBuf::from(env::var_os("RUSTC").unwrap());
 
     if rustc.is_relative() {
+        println!("cargo:rerun-if-env-changed=PATH");
         for dir in env::split_paths(&env::var_os("PATH").unwrap_or_default()) {
             let absolute = dir.join(&rustc);
             if absolute.exists() {