Skip to content

Commit 401614b

Browse files
committed
rustc_llvm: re-run build script when env var LLVM_CONFIG changes
1 parent d0e0f53 commit 401614b

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/bootstrap/compile.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,6 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
276276
if build.is_rust_llvm(target) {
277277
cargo.env("LLVM_RUSTLLVM", "1");
278278
}
279-
if let Some(ref cfg_file) = build.flags.config {
280-
let cfg_path = t!(PathBuf::from(cfg_file).canonicalize());
281-
cargo.env("CFG_LLVM_TOML", cfg_path.into_os_string());
282-
}
283279
cargo.env("LLVM_CONFIG", build.llvm_config(target));
284280
let target_config = build.config.target_config.get(target);
285281
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {

src/librustc_llvm/build.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ fn main() {
6060
});
6161

6262
println!("cargo:rerun-if-changed={}", llvm_config.display());
63-
64-
if let Some(cfg_toml) = env::var_os("CFG_LLVM_TOML") {
65-
let cfg_path = PathBuf::from(cfg_toml);
66-
println!("cargo:rerun-if-changed={}", cfg_path.display());
67-
}
63+
println!("cargo:rerun-if-env-changed=LLVM_CONFIG");
6864

6965
// Test whether we're cross-compiling LLVM. This is a pretty rare case
7066
// currently where we're producing an LLVM for a different platform than

0 commit comments

Comments
 (0)