From c936e5b12df7270fe2164050312967c6335afbe7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Jul 2016 11:11:30 +0200 Subject: Use link.exe instead of cl.exe to link executables --- build2/cxx/module.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'build2/cxx/module.cxx') diff --git a/build2/cxx/module.cxx b/build2/cxx/module.cxx index caeea9b..a4afe44 100644 --- a/build2/cxx/module.cxx +++ b/build2/cxx/module.cxx @@ -256,6 +256,7 @@ namespace build2 } } + const string& cid (cast (r["cxx.id"])); const string& tsys (cast (r["cxx.target.system"])); const string& tclass (cast (r["cxx.target.class"])); @@ -277,6 +278,14 @@ namespace build2 info << "cxx.target is " << ct; } + // In the VC world you link things directly with link.exe. + // + if (cid == "msvc") + { + if (!cast_false (b["bin.ld.loaded"])) + load_module ("bin.ld", r, b, loc, false, bin_hints); + } + // If our target is MinGW, then we will need the resource compiler // (windres) in order to embed the manifest. // -- cgit v1.1