diff --git a/src/librustc_asan/build.rs b/src/librustc_asan/build.rs index cc856ba68fbb7..645707ccc0338 100644 --- a/src/librustc_asan/build.rs +++ b/src/librustc_asan/build.rs @@ -4,6 +4,7 @@ use build_helper::sanitizer_lib_boilerplate; use cmake::Config; fn main() { + println!("cargo:rerun-if-env-changed=RUSTC_BUILD_SANITIZERS"); if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { return; } diff --git a/src/librustc_lsan/build.rs b/src/librustc_lsan/build.rs index d5f3e37dea51c..73720d8c2d64e 100644 --- a/src/librustc_lsan/build.rs +++ b/src/librustc_lsan/build.rs @@ -4,6 +4,7 @@ use build_helper::sanitizer_lib_boilerplate; use cmake::Config; fn main() { + println!("cargo:rerun-if-env-changed=RUSTC_BUILD_SANITIZERS"); if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { return; } diff --git a/src/librustc_msan/build.rs b/src/librustc_msan/build.rs index de1676f489a46..a81786ee36d04 100644 --- a/src/librustc_msan/build.rs +++ b/src/librustc_msan/build.rs @@ -4,6 +4,7 @@ use build_helper::sanitizer_lib_boilerplate; use cmake::Config; fn main() { + println!("cargo:rerun-if-env-changed=RUSTC_BUILD_SANITIZERS"); if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { return; } diff --git a/src/librustc_tsan/build.rs b/src/librustc_tsan/build.rs index 6df9691257455..f9333e1502327 100644 --- a/src/librustc_tsan/build.rs +++ b/src/librustc_tsan/build.rs @@ -4,6 +4,7 @@ use build_helper::sanitizer_lib_boilerplate; use cmake::Config; fn main() { + println!("cargo:rerun-if-env-changed=RUSTC_BUILD_SANITIZERS"); if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { return; }