aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-12 13:05:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-08-12 13:05:54 +0200
commitb01aaa16e5adaa0cc064490535f8756b2ef8d421 (patch)
tree1afe1a335610def3fa20ba93372bbdb6bf90d025 /libbuild2/cc/link-rule.hxx
parent7382e4bf15d11b9200d6220b2a89e1f82b220c5e (diff)
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)
Diffstat (limited to 'libbuild2/cc/link-rule.hxx')
-rw-r--r--libbuild2/cc/link-rule.hxx7
1 files changed, 7 insertions, 0 deletions
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<name>&,
+ names&,
+ vector<reference_wrapper<const name>>* = nullptr) const;
+
optional<path>
find_system_library (const strings&) const;