diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-18 10:47:22 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-10-18 12:54:53 +0800 |
| commit | 617faa90e5bfd02862681fe29f3bfd24b567a16f (patch) | |
| tree | 8b4ba6d04b2fb94d38071c774478d0eba713aa3f /src/bootstrap | |
| parent | 9ee49bbb88c2c7f4e06a14c95da2e0c0b843abd8 (diff) | |
| parent | b57366a85457ddf6c5cb8ff4f329776c5311c5a4 (diff) | |
| download | rust-617faa90e5bfd02862681fe29f3bfd24b567a16f.tar.gz rust-617faa90e5bfd02862681fe29f3bfd24b567a16f.zip | |
Rollup merge of #55031 - nikic:verify_llvm_ir, r=Mark-Simulacrum
Improve verify_llvm_ir config option LLVM IR verification has been disabled by default in #51230. However, the implementation doesn't quite match what was discussed in the discussion. This patch implements two changes: * Make `verify_llvm_ir` influence the behavior of the compiled rustc binary, rather than just the rustc build system. That is, if `verify_llvm_ir=true`, even manual invocations of the built rustc will verify LLVM IR. * Enable verification of LLVM IR in CI, for non-deploy and deploy-alt builds. This is similar to how LLVM assertions are handled.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/builder.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 3 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index b89976eca26..b6764c1aaea 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -287,10 +287,6 @@ fn main() { cmd.arg("--cfg").arg("parallel_queries"); } - if env::var_os("RUSTC_VERIFY_LLVM_IR").is_some() { - cmd.arg("-Z").arg("verify-llvm-ir"); - } - if env::var_os("RUSTC_DENY_WARNINGS").is_some() && env::var_os("RUSTC_EXTERNAL_TOOL").is_none() { cmd.arg("-Dwarnings"); diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index b842bc43f5b..aa4e44df2ef 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1000,10 +1000,6 @@ impl<'a> Builder<'a> { cargo.env("RUSTC_BACKTRACE_ON_ICE", "1"); } - if self.config.rust_verify_llvm_ir { - cargo.env("RUSTC_VERIFY_LLVM_IR", "1"); - } - cargo.env("RUSTC_VERBOSE", self.verbosity.to_string()); // in std, we want to avoid denying warnings for stage 0 as that makes cfg's painful. diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 7d235743c2c..69d45acdeda 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -569,6 +569,9 @@ pub fn rustc_cargo_env(builder: &Builder, cargo: &mut Command) { if builder.config.rustc_parallel_queries { cargo.env("RUSTC_PARALLEL_QUERIES", "1"); } + if builder.config.rust_verify_llvm_ir { + cargo.env("RUSTC_VERIFY_LLVM_IR", "1"); + } } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] |
