aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis J Bezault <curtbezault@gmail.com>2020-01-09 14:27:03 -0800
committerVictor Romero <romerosanchezv@gmail.com>2020-01-09 14:27:03 -0800
commit7b61b7b515cc077e2ce76505cad94c4268ef2bb4 (patch)
tree27f6d42493a9e48bce6bf496d802388e0e23dcaa
parent1488c8ea79bc990eac3c523fcf2e2eb29105a5a3 (diff)
downloadvcpkg-7b61b7b515cc077e2ce76505cad94c4268ef2bb4.tar.gz
vcpkg-7b61b7b515cc077e2ce76505cad94c4268ef2bb4.zip
Allow ARM64 to build x86 things (#9578)
-rw-r--r--toolsrc/src/vcpkg/base/system.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp
index d9c6349be..c84b7f8be 100644
--- a/toolsrc/src/vcpkg/base/system.cpp
+++ b/toolsrc/src/vcpkg/base/system.cpp
@@ -157,11 +157,24 @@ namespace vcpkg
std::vector<CPUArchitecture> supported_architectures;
supported_architectures.push_back(get_host_processor());
- // AMD64 machines support to run x86 applications
+ // AMD64 machines support running x86 applications and ARM64 machines support running ARM applications
if (supported_architectures.back() == CPUArchitecture::X64)
{
supported_architectures.push_back(CPUArchitecture::X86);
}
+ else if (supported_architectures.back() == CPUArchitecture::ARM64)
+ {
+ supported_architectures.push_back(CPUArchitecture::ARM);
+ }
+
+#if defined(_WIN32)
+ // On ARM32/64 Windows we can rely on x86 emulation
+ if (supported_architectures.front() == CPUArchitecture::ARM ||
+ supported_architectures.front() == CPUArchitecture::ARM64)
+ {
+ supported_architectures.push_back(CPUArchitecture::X86);
+ }
+#endif
return supported_architectures;
}