record mtime in llvm linker script
This will avoid rebuilds due to the script being more recent than the rest of the original files.
This commit is contained in:
parent
b91ceb88de
commit
1c3fe15f6c
@ -2048,6 +2048,13 @@ fn install_llvm_file(
|
||||
let link = t!(fs::read_link(source));
|
||||
let mut linker_script = t!(fs::File::create(full_dest));
|
||||
t!(write!(linker_script, "INPUT({})\n", link.display()));
|
||||
|
||||
// We also want the linker script to have the same mtime as the source, otherwise it
|
||||
// can trigger rebuilds.
|
||||
let meta = t!(fs::metadata(source));
|
||||
if let Ok(mtime) = meta.modified() {
|
||||
t!(linker_script.set_modified(mtime));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
builder.install(&source, destination, 0o644);
|
||||
|
Loading…
Reference in New Issue
Block a user