diff options
-rw-r--r-- | src/ninja.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index e555df4..15e265b 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -147,7 +147,9 @@ struct NinjaMain : public BuildLogUser { // edge is rare, and the first recompaction will delete all old outputs from // the deps log, and then a second recompaction will clear the build log, // which seems good enough for this corner case.) - return !n || !n->in_edge(); + // Do keep entries around for files which still exist on disk, for + // generators that want to use this information. + return (!n || !n->in_edge()) && disk_interface_.Stat(s.AsString()) == 0; } }; |