From b05a3e9e671cf36640522f8d272647001dda5762 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 Apr 2024 05:48:45 +0200 Subject: Make sure ad hoc member is matched even if group match failed --- libbuild2/algorithm.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- cgit v1.1