diff options
Diffstat (limited to 'build2/target.cxx')
-rw-r--r-- | build2/target.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/target.cxx b/build2/target.cxx index 668db92..81d0e4b 100644 --- a/build2/target.cxx +++ b/build2/target.cxx @@ -174,10 +174,11 @@ namespace build2 // We have the spin-lock. Quickly get the matched action and unlock. // action_type ma (action); + bool failed (state_ == target_state::failed); task_count.store (e, memory_order_release); - if (ma > a) - return target_state::unchanged; // Overriden. + if (ma > a) // Overriden. + return failed ? target_state::failed: target_state::unchanged; // Otherwise we should have a matched target. // |