aboutsummaryrefslogtreecommitdiff
path: root/build2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-06 09:57:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-06 09:57:15 +0200
commitd1d1d444f0b4abbb628625240025bfe3cfe77459 (patch)
treefcf205ddca672679eb59f4ce41dc99d238588c21 /build2/target.cxx
parent02f717d4b7883451f37bb690c7708dda21cc4419 (diff)
Tweak target locking logic
Diffstat (limited to 'build2/target.cxx')
-rw-r--r--build2/target.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/build2/target.cxx b/build2/target.cxx
index dacf534..fa8378c 100644
--- a/build2/target.cxx
+++ b/build2/target.cxx
@@ -149,15 +149,12 @@ namespace build2
if (e >= busy)
return target_state::unchanged; // Override in progress.
+ // Unlike lock_impl(), we are only called after being matched for this
+ // action so if we see executed, then it means executed for this action
+ // (or noop).
+ //
if (e == exec)
- {
- // Sanity check: we better not be overriding a recipe for an already
- // executed target.
- //
- assert (action == a);
-
return group_state () ? group->state_ : state_;
- }
// Try to grab the spin-lock.
//