summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorMaxim Kalaev <maximus.ka@gmail.com>2013-09-02 22:44:32 (GMT)
committerNico Weber <nicolasweber@gmx.de>2013-09-02 22:44:32 (GMT)
commit25a3c97a8203dff5589bc13e835b9f362a51f3ab (patch)
tree94346966a161f1a565dadaa62f99ba96ad87ac40 /src/build.cc
parent41c6258ec1928cbcfc5642504cb9c2b3659fa897 (diff)
downloadNinja-25a3c97a8203dff5589bc13e835b9f362a51f3ab.zip
Ninja-25a3c97a8203dff5589bc13e835b9f362a51f3ab.tar.gz
Ninja-25a3c97a8203dff5589bc13e835b9f362a51f3ab.tar.bz2
Fix restat rebuild if deps are missing.
Fixes issue #603. Apparently, the problem was caused by my fix r "consider target dirty if depfile is missing" (bcc8ad1), which was not working correctly with restat rules cleaning nodes. Switching to deps only triggered an easily observable issue. Fix by setting a flag in edges with invalid deps, and not cleaning edges with that flag set.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/build.cc b/src/build.cc
index 76d317f..8a93632 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -408,6 +408,10 @@ void Plan::CleanNode(DependencyScan* scan, Node* node) {
if (want_i == want_.end() || !want_i->second)
continue;
+ // Don't attempt to clean an edge if it failed to load deps.
+ if ((*ei)->deps_missing_)
+ continue;
+
// If all non-order-only inputs for this edge are now clean,
// we might have changed the dirty state of the outputs.
vector<Node*>::iterator