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:
Brad King
2026-03-26 14:09:00 -04:00
parent 79482d3b41
commit 882af5e362

View File

@@ -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,