aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-10-10 23:13:46 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-14 12:57:28 +0200
commit2671496db7c3996a6d8467360979f3085375c6df (patch)
tree281531a27acfdd4a929f19b6b35ce2a94bfc9633 /libbuild2/cc/link-rule.cxx
parent19e1b71a396e6b82c8e8a4602446ada0173579b9 (diff)
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.
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r--libbuild2/cc/link-rule.cxx16
1 files changed, 8 insertions, 8 deletions
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)