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/compile-rule.hxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'libbuild2/cc/compile-rule.hxx') diff --git a/libbuild2/cc/compile-rule.hxx b/libbuild2/cc/compile-rule.hxx index 93972a2..4c74016 100644 --- a/libbuild2/cc/compile-rule.hxx +++ b/libbuild2/cc/compile-rule.hxx @@ -58,20 +58,18 @@ namespace build2 struct match_data; using environment = small_vector; + template + void + append_sys_inc_options (T&) const; + + template void append_lib_options (const scope&, - cstrings&, + T&, action, const target&, linfo) const; - void - hash_lib_options (const scope&, - sha256&, - action, - const target&, - linfo) const; - // Mapping of include prefixes (e.g., foo in ) for auto- // generated headers to directories where they will be generated. // -- cgit v1.1