From 9650726961a281ea982660c2cc82d4da046b5622 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 May 2023 09:45:01 +0200 Subject: Explicit group: dynamic members --- libbuild2/target.ixx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libbuild2/target.ixx') diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 3f005c3..a550acb 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -720,8 +720,13 @@ namespace build2 inline timestamp mtime_target:: load_mtime (const path& p) const { - assert (ctx.phase == run_phase::execute && - !group_state (action () /* inner */)); + // We can only enforce "not group state" during the execute phase. During + // match (e.g., the target is being matched), we will just have to pay + // attention. + // + assert (ctx.phase == run_phase::match || + (ctx.phase == run_phase::execute && + !group_state (action () /* inner */))); duration::rep r (mtime_.load (memory_order_consume)); if (r == timestamp_unknown_rep) -- cgit v1.1