aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/guess.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-09-30 14:41:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-09-30 14:41:22 +0200
commit9f7789ffdae2ea0aa5a3b389ca9745ff160fa60f (patch)
tree79e9759013f755a06cd107a30d1e80cfe8cf0b96 /libbuild2/cc/guess.cxx
parent9a7904fc891c9fe7a48e6f53707100983574118c (diff)
Fix issues in MSVC ARM64 support
Diffstat (limited to 'libbuild2/cc/guess.cxx')
-rw-r--r--libbuild2/cc/guess.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index f092933..406534d 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -949,9 +949,15 @@ namespace build2
// there is nothing like -m32/-m64 or /MACHINE). Targeting
// 64-bit seems like as good of a default as any.
//
- fb = ((dir_path (mi->msvc_dir) /= "bin") /= "Hostx64") /=
- "x64";
-
+ fb = dir_path (mi->msvc_dir) /= "bin";
+
+#if defined(_M_ARM64) || defined(__aarch64__)
+ fb /= "HostARM64";
+ fb /= "ARM64";
+#else
+ fb /= "Hostx64";
+ fb /= "x64";
+#endif
search_info = info_ptr (
new msvc_info (move (*mi)), msvc_info_deleter);
}
@@ -1631,8 +1637,13 @@ namespace build2
// MSVC tools (link.exe, etc). In case of the Platform SDK, it's unclear
// what the CPU signifies (host, target, both).
//
- r = (((dir_path (mi.msvc_dir) /= "bin") /= "Hostx64") /= cpu).
- representation ();
+ r = (((dir_path (mi.msvc_dir) /= "bin") /=
+#if defined(_M_ARM64) || defined(__aarch64__)
+ "HostARM64"
+#else
+ "Hostx64"
+#endif
+ ) /= cpu).representation ();
r += path::traits_type::path_separator;