diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-01-03 05:16:38 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-01-03 05:16:38 (GMT) |
commit | 691474973aeeb4d1002cd3c8fae3e106767e36f6 (patch) | |
tree | 51a88c7c1c99476a031be51d94e74fd234cf2f0f /src/deps_log.cc | |
parent | 7a5fc52601d6e1db5786e0a83d7cc93e2d32a097 (diff) | |
download | Ninja-691474973aeeb4d1002cd3c8fae3e106767e36f6.zip Ninja-691474973aeeb4d1002cd3c8fae3e106767e36f6.tar.gz Ninja-691474973aeeb4d1002cd3c8fae3e106767e36f6.tar.bz2 |
Add a test for collection of dead deps entries.
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r-- | src/deps_log.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc index 0a3f7e5..157b65c 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -329,6 +329,12 @@ bool DepsLog::Recompact(const string& path, string* err) { Edge* e = n->in_edge(); // FIXME: move this condition to a helper: (also used in src/ninja.cc) if (!e || e->GetBinding("deps").empty()) { + // Skip entries that don't have in-edges or whose edges don't have a + // "deps" attribute. They were in the deps log from previous builds, but + // the the files they were for were removed from the build and their deps + // entries are no longer needed. + // (Without the check for "deps", a chain of two or more nodes that each + // had deps wouldn't be collected in a single recompaction.) continue; } |