about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-06 19:00:46 +0200
committerGitHub <noreply@github.com>2019-09-06 19:00:46 +0200
commit8bbd71b99a3993c83267a25c62f990139e277f3b (patch)
tree55afc0b7e0b2f0a9f9dc3dbb580ae08f7e2b5dd4 /src/bootstrap
parente61813548a23c0d5ea5eb306734760b0d92f7f6c (diff)
parent485697bf42cc6a03712e82e69c8f2357a2576454 (diff)
downloadrust-8bbd71b99a3993c83267a25c62f990139e277f3b.tar.gz
rust-8bbd71b99a3993c83267a25c62f990139e277f3b.zip
Rollup merge of #64166 - infinity0:master, r=alexcrichton
Better way of conditioning the sanitizer builds

Previously the build would take the presence of the LLVM_CONFIG envvar to
mean that the sanitizers should be built, but this is a common envvar that
could be set for reasons unrelated to the rustc sanitizers.

This commit adds a new envvar RUSTC_BUILD_SANITIZERS and uses it instead.

This PR or similar will be necessary in order to work correctly with https://github.com/rust-lang-nursery/compiler-builtins/pull/296
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/compile.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 9d57a4f00d7..9a964457ef2 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -212,6 +212,7 @@ pub fn std_cargo(builder: &Builder<'_>,
                 emscripten: false,
             });
             cargo.env("LLVM_CONFIG", llvm_config);
+            cargo.env("RUSTC_BUILD_SANITIZERS", "1");
         }
 
         cargo.arg("--features").arg(features)