rustbuild: Fix dependency tracking with new Cargo

The recent Cargo update changed filenames, which broke a lot of incremental
rustbuild builds. What it thought were the output files were indeed no longer
the output files! (wreaking havoc).

This commit updates this to stop guessing filenames of Cargo and just manage
stamp files instead.
This commit is contained in:
Alex Crichton
2016-09-12 21:46:35 -07:00
parent fa9d8cc8ac
commit 194a91b0ce
2 changed files with 39 additions and 8 deletions

View File

@@ -585,6 +585,8 @@ impl Build {
if mtime(&stamp) < mtime(input) {
self.verbose(&format!("Dirty - {}", dir.display()));
let _ = fs::remove_dir_all(dir);
} else if stamp.exists() {
return
}
t!(fs::create_dir_all(dir));
t!(File::create(stamp));