From 6e197bdfcc680080bd18bcc3c612447472090841 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 6 Dec 2017 10:50:31 +0200 Subject: More work on Clang on Windows/MSVC support --- build2/cc/init.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index b2cb2b3..b49de15 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -289,16 +289,15 @@ namespace build2 } } - const string& cid (cast (rs["cc.id"])); - const string& tsys (cast (rs["cc.target.system"])); - // Load bin.*.config for bin.* modules we may need (see core_init() // below). // + const string& tsys (cast (rs["cc.target.system"])); + if (!cast_false (rs["bin.ar.config.loaded"])) load_module (rs, rs, "bin.ar.config", loc); - if (cid == "msvc") + if (tsys == "win32-msvc") { if (!cast_false (rs["bin.ld.config.loaded"])) load_module (rs, rs, "bin.ld.config", loc); @@ -327,6 +326,8 @@ namespace build2 assert (first); + const string& tsys (cast (rs["cc.target.system"])); + // Load cc.core.config. // if (!cast_false (rs["cc.core.config.loaded"])) @@ -337,18 +338,15 @@ namespace build2 if (!cast_false (rs["bin.loaded"])) load_module (rs, rs, "bin", loc); - const string& cid (cast (rs["cc.id"])); - const string& tsys (cast (rs["cc.target.system"])); - // Load the bin.ar module. // 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 + // For this target we link things directly with link.exe so load the // bin.ld module. // - if (cid == "msvc") + if (tsys == "win32-msvc") { if (!cast_false (rs["bin.ld.loaded"])) load_module (rs, rs, "bin.ld", loc); -- cgit v1.1