From 2671496db7c3996a6d8467360979f3085375c6df Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 10 Oct 2019 23:13:46 +0300 Subject: Implement MSVC installation discovery for version 15 (2017) and later In particular, this removes the requirement to build from the Visual Studio command prompt. Note that since MSVC compiler binaries are target-specific (i.e., there are no -m32/-m64 options nor something like /MACHINE), in this case we default to a 64-bit build (a 32-bit build can still be achieved by running from a suitable command prompt). Finally, this mechanism is also used to find Clang bundled with MSVC. --- libbuild2/cc/link-rule.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libbuild2/cc/link-rule.cxx') diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 8aedcad..f10bd42 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -1573,10 +1573,10 @@ namespace build2 } void link_rule:: - hash_libraries (sha256& cs, - bool& update, timestamp mt, - const file& l, bool la, lflags lf, - const scope& bs, action a, linfo li) const + append_libraries (sha256& cs, + bool& update, timestamp mt, + const file& l, bool la, lflags lf, + const scope& bs, action a, linfo li) const { struct data { @@ -1666,7 +1666,7 @@ namespace build2 ? (exp ? x_export_loptions : x_loptions) : l.ctx.var_pool[t + (exp ? ".export.loptions" : ".loptions")])); - hash_options (d.cs, *g, var); + append_options (d.cs, *g, var); } }; @@ -2436,7 +2436,7 @@ namespace build2 // if (la || ls) { - hash_libraries (cs, update, mt, *f, la, p.data, bs, a, li); + append_libraries (cs, update, mt, *f, la, p.data, bs, a, li); f = nullptr; // Timestamp checked by hash_libraries(). } else @@ -2475,8 +2475,8 @@ namespace build2 // if (!lt.static_library ()) { - hash_options (cs, t, c_libs); - hash_options (cs, t, x_libs); + append_options (cs, t, c_libs); + append_options (cs, t, x_libs); } if (dd.expect (cs.string ()) != nullptr) -- cgit v1.1