summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/build.cc b/src/build.cc
index 0caf6e7..2d3d9b4 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -872,11 +872,13 @@ void Builder::FinishCommand(CommandRunner::Result* result) {
restat_mtime);
}
- if (!deps_type.empty() && scan_.deps_log()) {
+ if (!deps_type.empty()) {
assert(edge->outputs_.size() == 1);
Node* out = edge->outputs_[0];
- // XXX need to restat for restat_mtime.
- scan_.deps_log()->RecordDeps(out, restat_mtime, deps_nodes);
+ TimeStamp mtime = disk_interface_->Stat(out->path());
+ // XXX we could reuse the restat logic to avoid a second stat,
+ // but in practice we only care about the single output.
+ scan_.deps_log()->RecordDeps(out, mtime, deps_nodes);
}
}