forked from qt-creator/qt-creator
ProjectExplorer: Fix Windows Arm64 MSVC compilers detection
Microsoft offers cross-compilers for the Arm64 architecture. Windows 11 Arm64 can emulate the x86 and x64 architecture so the binaries that can be run should be taken into consideration. Change-Id: I330c15a2c543eada9f7c939887ce13a1dd7559fd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -65,6 +65,7 @@ HostOsInfo::HostArchitecture HostOsInfo::hostArchitecture()
|
||||
case PROCESSOR_ARCHITECTURE_IA64:
|
||||
return HostOsInfo::HostArchitectureItanium;
|
||||
case PROCESSOR_ARCHITECTURE_ARM:
|
||||
case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
return HostOsInfo::HostArchitectureArm;
|
||||
default:
|
||||
return HostOsInfo::HostArchitectureUnknown;
|
||||
|
@@ -158,12 +158,23 @@ static bool hostSupportsPlatform(MsvcToolChain::Platform platform)
|
||||
{
|
||||
if (hostPrefersPlatform(platform))
|
||||
return true;
|
||||
|
||||
switch (HostOsInfo::hostArchitecture()) {
|
||||
// The x86 host toolchains are not the preferred toolchains on amd64 but they are still
|
||||
// supported by that host
|
||||
return HostOsInfo::hostArchitecture() == HostOsInfo::HostArchitectureAMD64
|
||||
&& (platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
case HostOsInfo::HostArchitectureAMD64:
|
||||
return platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
|| platform == MsvcToolChain::x86_ia64 || platform == MsvcToolChain::x86_arm
|
||||
|| platform == MsvcToolChain::x86_arm64);
|
||||
|| platform == MsvcToolChain::x86_arm64;
|
||||
// The Arm64 host can run the cross-compilers via emulation of x86 and amd64
|
||||
case HostOsInfo::HostArchitectureArm:
|
||||
return platform == MsvcToolChain::x86_arm || platform == MsvcToolChain::x86_arm64
|
||||
|| platform == MsvcToolChain::amd64_arm || platform == MsvcToolChain::amd64_arm64
|
||||
|| platform == MsvcToolChain::x86 || platform == MsvcToolChain::x86_amd64
|
||||
|| platform == MsvcToolChain::amd64 || platform == MsvcToolChain::amd64_x86;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static QString fixRegistryPath(const QString &path)
|
||||
|
Reference in New Issue
Block a user