aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-07-13 11:11:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-07-13 11:11:30 +0200
commitc936e5b12df7270fe2164050312967c6335afbe7 (patch)
tree82cc8fbdcffb23de10ed9d90f8c419261f7e11b2 /build2/cxx/module.cxx
parent53f8c12cb587d0500ce6b2f1bb67e186cea610f1 (diff)
Use link.exe instead of cl.exe to link executables
Diffstat (limited to 'build2/cxx/module.cxx')
-rw-r--r--build2/cxx/module.cxx9
1 files changed, 9 insertions, 0 deletions
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<string> (r["cxx.id"]));
const string& tsys (cast<string> (r["cxx.target.system"]));
const string& tclass (cast<string> (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<bool> (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.
//