aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/common.cxx7
-rw-r--r--libbuild2/target.ixx7
2 files changed, 7 insertions, 7 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx
index 3b49d58..3c4e38d 100644
--- a/libbuild2/cc/common.cxx
+++ b/libbuild2/cc/common.cxx
@@ -597,12 +597,7 @@ namespace build2
const char* w (nullptr);
if (t.ctx.phase == run_phase::match)
{
- size_t o (
- t.state[a].task_count.load (memory_order_consume) -
- t.ctx.count_base ());
-
- if (o != target::offset_applied &&
- o != target::offset_executed)
+ if (!t.matched (a))
w = "not matched";
}
else if (t.mtime () == timestamp_unknown)
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx
index 5432f7c..899e829 100644
--- a/libbuild2/target.ixx
+++ b/libbuild2/target.ixx
@@ -245,7 +245,12 @@ namespace build2
if (ctx.phase == run_phase::match)
{
- return c == offset_applied;
+ // While it will normally be applied, it could also be already executed.
+ //
+ // Note that we can't do >= offset_applied since offset_busy means it is
+ // being matched.
+ //
+ return c == offset_applied || c == offset_executed;
}
else
{