aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-08-25 16:18:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-08-25 16:18:58 +0200
commit3cf8015a4941c43ae82100dc0d998945485d760c (patch)
tree0388fc33770bffb92fcc016bdb89487370a4ec8e /libbuild2/operation.cxx
parent190af1175755e2a76b1ac182414ae261a15bb276 (diff)
Fix bug in interaction of unmatch logic with target groups
Diffstat (limited to 'libbuild2/operation.cxx')
-rw-r--r--libbuild2/operation.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx
index a14dfb7..1594d8b 100644
--- a/libbuild2/operation.cxx
+++ b/libbuild2/operation.cxx
@@ -442,6 +442,21 @@ namespace build2
// haven't failed (in which case we could have bailed out early).
//
assert (ctx.target_count.load (memory_order_relaxed) == 0);
+
+#ifndef NDEBUG
+ if (ctx.dependency_count.load (memory_order_relaxed) != 0)
+ {
+ diag_record dr;
+ dr << info << "detected unexecuted matched targets:";
+
+ for (const auto& pt: ctx.targets)
+ {
+ const target& t (*pt);
+ if (size_t n = t[a].dependents.load (memory_order_relaxed))
+ dr << text << t << ' ' << n;
+ }
+ }
+#endif
assert (ctx.dependency_count.load (memory_order_relaxed) == 0);
}