summaryrefslogtreecommitdiffstats
path: root/src/graph.h
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.h
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.h')
-rw-r--r--src/graph.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graph.h b/src/graph.h
index d5d0f4f..868413c 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -135,8 +135,8 @@ struct Rule {
/// An edge in the dependency graph; links between Nodes using Rules.
struct Edge {
- Edge() : rule_(NULL), env_(NULL), outputs_ready_(false), implicit_deps_(0),
- order_only_deps_(0) {}
+ Edge() : rule_(NULL), env_(NULL), outputs_ready_(false), deps_missing_(false),
+ implicit_deps_(0), order_only_deps_(0) {}
/// Return true if all inputs' in-edges are ready.
bool AllInputsReady() const;
@@ -157,6 +157,7 @@ struct Edge {
vector<Node*> outputs_;
BindingEnv* env_;
bool outputs_ready_;
+ bool deps_missing_;
const Rule& rule() const { return *rule_; }
Pool* pool() const { return pool_; }