aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-05-26 12:15:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-05-29 10:21:12 +0200
commit5393589ec2d898a02c52adf9125a592d3d7ff829 (patch)
treeff12d99d83f17b3c03332664c28d04527da412ec /libbuild2/algorithm.cxx
parentab91d32c1b23ea92b988d5618db2938a8c5dc63f (diff)
Disable counts verification if matched but not executed in resolve_members()
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r--libbuild2/algorithm.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx
index 966c7a8..cf972e7 100644
--- a/libbuild2/algorithm.cxx
+++ b/libbuild2/algorithm.cxx
@@ -1283,7 +1283,10 @@ namespace build2
throw failed ();
if ((r = g.group_members (a)).members != nullptr)
+ {
+ g.ctx.resolve_count.fetch_add (1, memory_order_relaxed);
break;
+ }
// Unlock and to execute ...
//
@@ -1300,6 +1303,10 @@ namespace build2
// we would have already known the members list) and we really do need
// to execute it now.
//
+ // Note that while it might be tempting to decrement resolve_count
+ // here, there is no guarantee that we were the ones who have matched
+ // this target.
+ //
{
phase_switch ps (g.ctx, run_phase::execute);
execute_direct_sync (a, g);