From c5f14c1735d1eb1c7df29515da78e3acde15a5a3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Aug 2021 15:26:45 +0200 Subject: Implement traversal pruning in process_libraries() --- libbuild2/cc/pkgconfig.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbuild2/cc/pkgconfig.cxx') diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index 7061491..c3a9028 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -1662,7 +1662,7 @@ namespace build2 if (al != nullptr && al->end != appended_library::npos) { d.ls.hoist (d.args, *al); - return; + return true; } if (l != nullptr) @@ -1680,6 +1680,8 @@ namespace build2 if (al != nullptr) al->end = d.args.size (); // Close. + + return true; }; auto opt = [&d] (const target& lt, const string&, bool, bool) @@ -1693,7 +1695,9 @@ namespace build2 // See link_rule::append_libraries(). if (d.ls.append (l, d.args.size ()).end != appended_library::npos) - return; + return true; + + return true; }; // Pretend we are linking an executable using what would be normal, -- cgit v1.1