summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/graph.cc8
-rw-r--r--src/graph.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/graph.cc b/src/graph.cc
index fcfeba0..355285c 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -55,6 +55,7 @@ bool DependencyScan::RecomputeDirty(Edge* edge, string* err) {
if (!err->empty())
return false;
// Failed to load dependency info: rebuild to regenerate it.
+ // LoadDeps() did EXPLAIN() already, no need to do it here.
dirty = edge->deps_missing_ = true;
}
@@ -142,7 +143,12 @@ bool DependencyScan::RecomputeOutputDirty(Edge* edge,
if (edge->is_phony()) {
// Phony edges don't write any output. Outputs are only dirty if
// there are no inputs and we're missing the output.
- return edge->inputs_.empty() && !output->exists();
+ if (edge->inputs_.empty() && !output->exists()) {
+ EXPLAIN("output %s of phony edge with no inputs doesn't exist",
+ output->path().c_str());
+ return true;
+ }
+ return false;
}
BuildLog::LogEntry* entry = 0;
diff --git a/src/graph.h b/src/graph.h
index 9526712..5f8d41a 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -122,7 +122,8 @@ private:
/// An edge in the dependency graph; links between Nodes using Rules.
struct Edge {
- Edge() : rule_(NULL), env_(NULL), outputs_ready_(false), deps_missing_(false),
+ Edge() : rule_(NULL), pool_(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.