From 401614b75a1d653786fd527546d288e4cba3a58e Mon Sep 17 00:00:00 2001 From: Venkata Giri Reddy Date: Fri, 30 Jun 2017 16:55:32 +0000 Subject: [PATCH] rustc_llvm: re-run build script when env var LLVM_CONFIG changes --- src/bootstrap/compile.rs | 4 ---- src/librustc_llvm/build.rs | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index c8ab3a8fc1d99..b2bd792e93ba6 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -276,10 +276,6 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) { if build.is_rust_llvm(target) { cargo.env("LLVM_RUSTLLVM", "1"); } - if let Some(ref cfg_file) = build.flags.config { - let cfg_path = t!(PathBuf::from(cfg_file).canonicalize()); - cargo.env("CFG_LLVM_TOML", cfg_path.into_os_string()); - } cargo.env("LLVM_CONFIG", build.llvm_config(target)); let target_config = build.config.target_config.get(target); if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) { diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 01b37a55f4fe7..3f0f5369607e5 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -60,11 +60,7 @@ fn main() { }); println!("cargo:rerun-if-changed={}", llvm_config.display()); - - if let Some(cfg_toml) = env::var_os("CFG_LLVM_TOML") { - let cfg_path = PathBuf::from(cfg_toml); - println!("cargo:rerun-if-changed={}", cfg_path.display()); - } + println!("cargo:rerun-if-env-changed=LLVM_CONFIG"); // Test whether we're cross-compiling LLVM. This is a pretty rare case // currently where we're producing an LLVM for a different platform than