aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-05-25 09:45:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-05-29 10:21:12 +0200
commit9650726961a281ea982660c2cc82d4da046b5622 (patch)
tree9cbcb422381695756a352b0df14c9a8852a16d9d /libbuild2/target.ixx
parente05f7c7383cc48823bd408c0bc5187191a9a1c48 (diff)
Explicit group: dynamic members
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r--libbuild2/target.ixx9
1 files changed, 7 insertions, 2 deletions
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)