summaryrefslogtreecommitdiffstats
path: root/src/graph.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/graph.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/graph.cc')
-rw-r--r--src/graph.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index eeb3db1..3616199 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -60,12 +60,13 @@ bool Rule::IsReservedBinding(const string& var) {
bool DependencyScan::RecomputeDirty(Edge* edge, string* err) {
bool dirty = false;
edge->outputs_ready_ = true;
+ edge->deps_missing_ = false;
if (!dep_loader_.LoadDeps(edge, err)) {
if (!err->empty())
return false;
// Failed to load dependency info: rebuild to regenerate it.
- dirty = true;
+ dirty = edge->deps_missing_ = true;
}
// Visit all inputs; we're dirty if any of the inputs are dirty.