From 2069cbb8f72bceb0fcb968ba05968a24eeb0c15d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Mar 2017 15:32:42 +0200 Subject: Unconditionally load bin.ar module in c and cxx modules With our utility library/until test approach this will probably be more common than not. --- build2/cc/init.cxx | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index 698753e..bc598c3 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -209,14 +209,8 @@ namespace build2 // Load bin.*.config for bin.* modules we may need (see core_init() // below). // - if (auto l = rs["config.bin.lib"]) - { - if (cast (l) != "shared") - { - if (!cast_false (rs["bin.ar.config.loaded"])) - load_module (rs, rs, "bin.ar.config", loc); - } - } + if (!cast_false (rs["bin.ar.config.loaded"])) + load_module (rs, rs, "bin.ar.config", loc); if (cid == "msvc") { @@ -281,17 +275,10 @@ namespace build2 const string& cid (cast (rs["cc.id"])); const string& tsys (cast (rs["cc.target.system"])); - // Load the bin.ar module unless we were asked to only build shared - // libraries. + // Load the bin.ar module. // - if (auto l = rs["config.bin.lib"]) - { - if (cast (l) != "shared") - { - if (!cast_false (rs["bin.ar.loaded"])) - load_module (rs, rs, "bin.ar", loc); - } - } + if (!cast_false (rs["bin.ar.loaded"])) + load_module (rs, rs, "bin.ar", loc); // In the VC world you link things directly with link.exe so load the // bin.ld module. -- cgit v1.1