summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorFredrik Medley <fredrik.medley@gmail.com>2015-07-12 06:53:19 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-06 15:21:09 (GMT)
commit7d21426c56306917ebaf16671a75215672d79755 (patch)
tree58ec26665664377828f9a56e7ed0ff387776bfbe /src/build.h
parent78f548880e549c701bd77760e4b3f3a4ee147641 (diff)
downloadNinja-7d21426c56306917ebaf16671a75215672d79755.zip
Ninja-7d21426c56306917ebaf16671a75215672d79755.tar.gz
Ninja-7d21426c56306917ebaf16671a75215672d79755.tar.bz2
Release the pool slot held by an edge whether it succeeds or fails
When an edge finishes building, it should be release from its pool. Make sure that this also is the case when an edge fails to build. The bug can be shown with a pool has size N, then `ninja -k N+1` will still stop after N failing commands for that pool, even if there are many more jobs to be done for that pool: pool mypool depth = 1 rule bad_rule command = false pool = mypool build a : bad_rule build b : bad_rule Current behaviour: $ ninja -k 0 [1/2] false FAILED: false ninja: build stopped: cannot make progress due to previous errors. Expected behaviour: $ ninja -k 0 [1/2] false FAILED: false [2/2] false FAILED: false ninja: build stopped: cannot make progress due to previous errors. Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/build.h b/src/build.h
index 8106faa..3a7183f 100644
--- a/src/build.h
+++ b/src/build.h
@@ -56,9 +56,8 @@ struct Plan {
/// Dumps the current state of the plan.
void Dump();
- /// Mark an edge as done building. Used internally and by
- /// tests.
- void EdgeFinished(Edge* edge);
+ /// Mark an edge as done building (whether it succeeded or failed).
+ void EdgeFinished(Edge* edge, bool success);
/// Clean the given node during the build.
/// Return false on error.