From 1c7cbb302b1c6e41eb0c5cecfc655532f1919cba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Jul 2017 13:46:26 +0200 Subject: Implement support for linking whole archive --- build2/bin/init.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'build2/bin') diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index fb9dd71..e145a23 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -76,6 +76,24 @@ namespace build2 vp.insert ("bin.libs.lib"); vp.insert ("bin.rpath"); + // Link whole archive. Note: non-overridable with target visibility. + // + // The lookup semantics is as follows: we first look for a prerequisite- + // specific value, then for a target-specific value in the library being + // linked, and then for target type/pattern-specific value starting from + // the scope of the target being linked-to. In that final lookup we do + // not look in the target being linked-to itself since that is used to + // indicate how this target should be linked to other targets. For + // example: + // + // exe{test}: liba{foo} + // liba{foo}: libu{foo1 foo2} + // liba{foo}: bin.whole = false # Affects test but not foo1 and foo2. + // + // If unspecified, defaults to false for liba{} and to true for libux{}. + // + vp.insert ("bin.whole", false, variable_visibility::target); + vp.insert ("bin.lib.prefix"); vp.insert ("bin.lib.suffix"); vp.insert ("bin.exe.prefix"); -- cgit v1.1