aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.cxx
diff options
context:
space:
mode:
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);