From 88e755607b0bd65c223fcac40756cb703449c09f Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 13 Sep 2019 20:59:46 -0700 Subject: [PATCH] Fix build script sanitizer check. --- src/librustc_asan/build.rs | 1 + src/librustc_lsan/build.rs | 1 + src/librustc_msan/build.rs | 1 + src/librustc_tsan/build.rs | 1 + 4 files changed, 4 insertions(+) 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; }