summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/build.cc b/src/build.cc
index 701fa92..2910385 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -418,6 +418,12 @@ Edge* Plan::FindWork() {
void Plan::ScheduleWork(Edge* edge) {
Pool* pool = edge->pool();
if (pool->ShouldDelayEdge()) {
+ // The graph is not completely clean. Some Nodes have duplicate Out edges.
+ // We need to explicitly ignore these here, otherwise their work will get
+ // scheduled twice (see https://github.com/martine/ninja/pull/519)
+ if (ready_.count(edge)) {
+ return;
+ }
pool->DelayEdge(edge);
pool->RetrieveReadyEdges(&ready_);
} else {