From 9d45f82f821f0663a7c21c69c26d93fa0613d48a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 May 2021 12:32:07 +0200 Subject: Handle duplicate suppression of multi-element libraries (-l foo) See GitHub issue #114 for context. --- libbuild2/cc/pkgconfig.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'libbuild2/cc/pkgconfig.cxx') diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index d44b0ec..671a51a 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -1635,11 +1635,11 @@ namespace build2 bool priv (false); auto imp = [&priv] (const target&, bool la) {return priv && la;}; - auto lib = [&save_library_target, - &save_library_name] (const target* const* lc, - const string& p, - lflags, - bool) + auto lib = [&save_library_target, &save_library_name] ( + const target* const* lc, + const small_vector, 2>& ns, + lflags, + bool) { const file* l (lc != nullptr ? &(*lc)->as () : nullptr); @@ -1649,7 +1649,12 @@ namespace build2 save_library_target (*l); } else - save_library_name (p); // Something "system'y", save as is. + { + // Something "system'y", save as is. + // + for (const string& n: ns) + save_library_name (n); + } }; auto opt = [] (const target&, const string&, bool, bool) -- cgit v1.1