mirror of
https://github.com/ninja-build/ninja.git
synced 2026-06-24 08:48:42 +00:00
Explicitly load a node's mtime before comparing it to the deps log
Previously we were relying on RecomputeNodeDirty to do this before LoadDeps. Avoid this non-local assumption. Suggestd-by: David 'Digit' Turner <digit+github@google.com>
This commit is contained in:
@@ -748,6 +748,11 @@ bool ImplicitDepLoader::LoadDepsFromLog(Edge* edge, string* err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load the output's mtime if we haven't already.
|
||||
if (!output->StatIfNecessary(disk_interface_, err)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Deps are invalid if the output is newer than the deps.
|
||||
if (output->mtime() > deps->mtime) {
|
||||
explanations_.Record(output,
|
||||
|
||||
Reference in New Issue
Block a user