diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-10 23:13:46 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-14 12:57:28 +0200 |
commit | 2671496db7c3996a6d8467360979f3085375c6df (patch) | |
tree | 281531a27acfdd4a929f19b6b35ce2a94bfc9633 /libbuild2/cc/compile-rule.hxx | |
parent | 19e1b71a396e6b82c8e8a4602446ada0173579b9 (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/compile-rule.hxx')
-rw-r--r-- | libbuild2/cc/compile-rule.hxx | 14 |
1 files changed, 6 insertions, 8 deletions
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<const char*, 2>; + template <typename T> + void + append_sys_inc_options (T&) const; + + template <typename T> 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 <foo/bar>) for auto- // generated headers to directories where they will be generated. // |