From d571e79baaf58032e291325043d7870eb13cb70b Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 3 Jan 2014 21:32:41 -0800 Subject: Add a comment. --- src/ninja.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ninja.cc b/src/ninja.cc index 5bf8221..008c052 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -140,6 +140,13 @@ struct NinjaMain : public BuildLogUser { virtual bool IsPathDead(StringPiece s) { Node* n = state_.LookupNode(s); + // Just checking n isn't enough: If an old output is both in the build log + // and in the deps log, it will have a Node object in state_. (It will also + // have an in edge if one of its inputs is another output that's in the deps + // log, but having a deps edge product an output thats input to another deps + // 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(); } }; -- cgit v0.12