aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-04-18 09:33:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-04-19 04:12:34 +0200
commit9920e41e1372229c52f74151af5f1570f32a489c (patch)
tree318f1524a46b753530c2dfa27680a12c9e12920a /libbuild2/algorithm.ixx
parent912ac87012ffc2fd0c6fb21823a0244c787ce5ba (diff)
Cache "recipe is group_action" information, clear recipes after execution
Diffstat (limited to 'libbuild2/algorithm.ixx')
-rw-r--r--libbuild2/algorithm.ixx7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/algorithm.ixx b/libbuild2/algorithm.ixx
index ce1ebee..02c430b 100644
--- a/libbuild2/algorithm.ixx
+++ b/libbuild2/algorithm.ixx
@@ -506,6 +506,7 @@ namespace build2
target::opstate& s (t[l.action]);
s.recipe = move (r);
+ s.recipe_group_action = false;
// If this is a noop recipe, then mark the target unchanged to allow for
// some optimizations.
@@ -531,9 +532,11 @@ namespace build2
// likely. The alternative (trying to "merge" the count keeping track of
// whether inner and/or outer is noop) gets hairy rather quickly.
//
- if (l.action.inner ())
+ if (f != nullptr && *f == &group_action)
+ s.recipe_group_action = true;
+ else
{
- if (f == nullptr || *f != &group_action)
+ if (l.action.inner ())
t.ctx.target_count.fetch_add (1, memory_order_relaxed);
}
}