Skip to content

Commit

Permalink
rustc_llvm: re-run build script when env var LLVM_CONFIG changes
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatagiri committed Jun 30, 2017
1 parent d0e0f53 commit 401614b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
6 changes: 1 addition & 5 deletions src/librustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 401614b

Please sign in to comment.