aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-04-23 05:48:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-04-23 05:48:45 +0200
commitb05a3e9e671cf36640522f8d272647001dda5762 (patch)
tree623cf1c5cfe50f5e4e7f0ef5a9b14ca311b2b6df /libbuild2
parentc505faf0ed9588875542dc323044fc2fc1960d33 (diff)
Make sure ad hoc member is matched even if group match failed
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/algorithm.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx
index 62c500d..16f1503 100644
--- a/libbuild2/algorithm.cxx
+++ b/libbuild2/algorithm.cxx
@@ -1282,6 +1282,19 @@ namespace build2
// has no own prerequisites and the group's ones will be matched
// by the group.
}
+ else
+ {
+ // Similar to catch(failed) below.
+ //
+ s.state = target_state::failed;
+ l.offset = target::offset_applied;
+
+ // Make sure we don't relock a failed target.
+ //
+ match_extra& me (s.match_extra);
+ me.cur_options = match_extra::all_options;
+ me.cur_options_.store (me.cur_options, memory_order_relaxed);
+ }
}
else
l.offset = target::offset_tried;