aboutsummaryrefslogtreecommitdiff
path: root/build2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-14 14:44:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-14 14:44:03 +0200
commitbee7ac72e5cf6856c1dd94875eb3026aeedf702d (patch)
tree9415eb7e9afd860032c1e3e0d1488d291ed7290a /build2/target.cxx
parent0275a8661dce5b89960d2baf6245bf08679fb596 (diff)
Preserve failed state even if recipe is overridden
Diffstat (limited to 'build2/target.cxx')
-rw-r--r--build2/target.cxx5
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.
//