diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-02-22 10:30:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-02-22 10:30:21 +0200 |
commit | 75cedf46dba58e94b55678dc64bd4f77e23de5cd (patch) | |
tree | 2248520c2c9ea41545536c00e3dd258802694aea | |
parent | 7459ac30aa69d6fc5a0e0d2a0050b475e7af85d6 (diff) |
Diagnose instead of asserting lib{} group with no members
Fixes GH issue #361.
-rw-r--r-- | libbuild2/bin/utility.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/bin/utility.cxx b/libbuild2/bin/utility.cxx index 2a87bbd..a03ea50 100644 --- a/libbuild2/bin/utility.cxx +++ b/libbuild2/bin/utility.cxx @@ -89,7 +89,9 @@ namespace build2 // Make sure group members are resolved. // group_view gv (resolve_members (a, l)); - assert (gv.members != nullptr); + + if (gv.members == nullptr) + fail << "group " << l << " has no members"; pair<otype, bool> p ( link_member (lmembers {l.a != nullptr, l.s != nullptr}, li.order)); |