diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-07-04 07:30:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-07-04 07:30:23 +0200 |
commit | ee0456ed4a5f3f6686fbb0a433161d1f9d8535fe (patch) | |
tree | 697834b68df162a004a6e13113260a11e0236af6 /build2/cc/utility.cxx | |
parent | f52b47eea4c5de553d202669f91e6f4f14668592 (diff) |
Remove libu{} target group
The semantics provided by libu{} is rarely required and as result was not
yet documented. However, if you are using it, the new way to achieve the
same result is to use both libue{} and libul{} explicitly, for example:
exe{foo}: libue{foo}
lib{foo}: libul{foo}
{libue libul}{foo}: cxx{*}
Diffstat (limited to 'build2/cc/utility.cxx')
-rw-r--r-- | build2/cc/utility.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/build2/cc/utility.cxx b/build2/cc/utility.cxx index 2179c14..3271f7c 100644 --- a/build2/cc/utility.cxx +++ b/build2/cc/utility.cxx @@ -46,17 +46,15 @@ namespace build2 const target* link_member (const bin::libx& x, action a, linfo li, bool exist) { - bool ul; - - if ((ul = x.is_a<libul> ()) || x.is_a<libu> ()) + if (x.is_a<libul> ()) { - // If this is a libul{} and we are linking an executable, then the - // member choice should be dictated by the members of lib{} this - // libul{} is "primarily" for. If both are being built, then it seems - // natural to prefer static over shared since it could be faster (but - // I am sure someone will probably want this configurable). + // For libul{} that is linked to an executable the member choice + // should be dictated by the members of lib{} this libul{} is + // "primarily" for. If both are being built, then it seems natural to + // prefer static over shared since it could be faster (but I am sure + // someone will probably want this configurable). // - if (ul && li.type == otype::e) + if (li.type == otype::e) { // Utility libraries are project-local which means the primarily // target should be in the same project as us. @@ -66,9 +64,9 @@ namespace build2 : otype::s; } - const target_type& tt (li.type == otype::a ? libua::static_type : - li.type == otype::s ? libus::static_type : - libue::static_type); + const target_type& tt (li.type == otype::a + ? libua::static_type + : libus::static_type); // Called by the compile rule during execute. // |