Skip to content

Commit

Permalink
[host_triplet] fix check for arm64 under x64 binary (#333)
Browse files Browse the repository at this point in the history
* [host_triplet] fix check for arm64 under x64 binary

* oops, 64-bit not 64 bit

* missing indirection
  • Loading branch information
strega-nil authored Jan 25, 2022
1 parent 97207bf commit 928d211
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/vcpkg/base/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ namespace vcpkg
CPUArchitecture get_host_processor()
{
#if defined(_WIN32)
auto raw_identifier = get_environment_variable("PROCESSOR_IDENTIFIER");
if (const auto id = raw_identifier.get())
{
// might be either ARMv8 (64-bit) or ARMv9 (64-bit)
if (Strings::contains(*id, "ARMv") && Strings::contains(*id, "(64-bit)"))
{
return CPUArchitecture::ARM64;
}
}

auto raw_w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432");
if (const auto w6432 = raw_w6432.get())
{
Expand Down

0 comments on commit 928d211

Please sign in to comment.