From b01aaa16e5adaa0cc064490535f8756b2ef8d421 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Aug 2021 13:05:54 +0200 Subject: Add ${c,cxx}.deduplicate_export_libs() function This function deduplicates interface library dependencies by removing libraries that are also interface dependencies of the specified libraries. This can result in significantly better build performance for heavily interface-interdependent library families (for example, like Boost). Typical usage: import intf_libs = ... import intf_libs += ... ... import intf_libs += ... intf_libs = $cxx.deduplicate_export_libs($intf_libs) --- libbuild2/cc/link-rule.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbuild2/cc/link-rule.hxx') diff --git a/libbuild2/cc/link-rule.hxx b/libbuild2/cc/link-rule.hxx index 3d801d6..0fc1790 100644 --- a/libbuild2/cc/link-rule.hxx +++ b/libbuild2/cc/link-rule.hxx @@ -214,6 +214,13 @@ namespace build2 append_binless_modules (strings&, sha256*, const scope&, action, const file&) const; + bool + deduplicate_export_libs ( + const scope&, + const vector&, + names&, + vector>* = nullptr) const; + optional find_system_library (const strings&) const; -- cgit v1.1