diff options
Diffstat (limited to 'libbuild2/bin/utility.cxx')
-rw-r--r-- | libbuild2/bin/utility.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libbuild2/bin/utility.cxx b/libbuild2/bin/utility.cxx index 11230cd..a03ea50 100644 --- a/libbuild2/bin/utility.cxx +++ b/libbuild2/bin/utility.cxx @@ -14,9 +14,6 @@ namespace build2 lorder link_order (const scope& bs, otype ot) { - // Initialize to suppress 'may be used uninitialized' warning produced - // by MinGW GCC 5.4.0. - // const char* var (nullptr); switch (ot) @@ -60,6 +57,11 @@ namespace build2 // prefer static over shared since it could be faster (but I am sure // someone will probably want this configurable). // + // Maybe we should use the bin.exe.lib order as a heuristics (i.e., + // the most likely utility library to be built is the one most likely + // to be linked)? Will need the variables rs-only, similar to + // bin.lib, which probably is a good thing. See also libul_rule. + // if (li.type == otype::e) { // Utility libraries are project-local which means the primarily @@ -87,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)); |