From 3cf8015a4941c43ae82100dc0d998945485d760c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 Aug 2020 16:18:58 +0200 Subject: Fix bug in interaction of unmatch logic with target groups --- libbuild2/operation.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbuild2/operation.cxx') 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); } -- cgit v1.1