mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
rustc_llvm: re-run build script if config.toml changes
This commit is contained in:
parent
8f66fafebd
commit
40f8536449
@ -276,6 +276,10 @@ 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()) {
|
||||
|
@ -61,6 +61,11 @@ 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());
|
||||
}
|
||||
|
||||
// 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
|
||||
// what this build script is currently running on.
|
||||
|
Loading…
Reference in New Issue
Block a user