aboutsummaryrefslogtreecommitdiff
path: root/build2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-21 12:18:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-21 12:18:15 +0200
commit6082d76936b8a65380eb7af03b4167d8f0298158 (patch)
tree4cfadd3f54c134a1a45086ad15015a88b902ffba /build2/target.cxx
parent0165fa7178319bb250be1882b3b457232236c820 (diff)
Implement short-circuiting to group state
This is necessary to get rid of bogus restarts in inject_prerequisites() where it think a group member was updated since its state changed from unknown to (group's) changed.
Diffstat (limited to 'build2/target.cxx')
-rw-r--r--build2/target.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/build2/target.cxx b/build2/target.cxx
index 663d31d..4d4fe2a 100644
--- a/build2/target.cxx
+++ b/build2/target.cxx
@@ -66,12 +66,9 @@ namespace build2
action = a;
recipe_ = move (r);
- // Also reset the target state. If this is a noop recipe, then
- // mark the target unchanged so that we don't waste time executing
- // the recipe.
+ // If this is a noop recipe, then mark the target unchanged so that we
+ // don't waste time executing the recipe.
//
- raw_state = target_state::unknown;
-
if (recipe_function** f = recipe_.target<recipe_function*> ())
{
if (*f == &noop_action)
@@ -89,6 +86,7 @@ namespace build2
reset (action_type)
{
prerequisite_targets.clear ();
+ raw_state = target_state::unknown;
}
group_view target::