Auto merge of #36439 - alexcrichton:fix-rustbuild, r=japaric

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:
bors
2016-09-15 17:19:09 -07:00
committed by GitHub
2 changed files with 39 additions and 8 deletions

View File

@@ -579,6 +579,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));