From d1fbcace59846d55c66e741dbc3d59e20ae3e5cf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 26 Jun 2019 12:28:05 +0200 Subject: Fix C/C++ link rule matching ambiguity by seeing-through utility libraries --- build2/cc/utility.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build2/cc/utility.hxx') diff --git a/build2/cc/utility.hxx b/build2/cc/utility.hxx index 82d9f71..bc6c3fb 100644 --- a/build2/cc/utility.hxx +++ b/build2/cc/utility.hxx @@ -60,8 +60,11 @@ namespace build2 // Given the link order return the library member to link. That is, liba{} // or libs{} for lib{} and libue{}, libua{} or libus{} for libu*{}. // - const target& - link_member (const bin::libx&, action, linfo); + // If existing is true, then only return the member target if it exists + // (currently only used and supported for utility libraries). + // + const target* + link_member (const bin::libx&, action, linfo, bool existing = false); } } -- cgit v1.1