windeployqt: MSVC: Add support for ARM64 hosts
Windeployqt deployed all the non Qt libraries in their x64 versions as it was not aware of the host it was running on. This check needs to be done before any deployment happens. Current support is limited for MSVC. mingw/clang might be done in followup commits. Change-Id: I70fd6ad66c9cacfc6ff5b109f214a142b8b6d5f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 81984807b30b1865a98fbd928a29d5ab6d8f5375) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6b1e1a319e
commit
a4118e8b2a
@ -139,8 +139,10 @@ static Platform platformFromMkSpec(const QString &xSpec)
|
||||
return WindowsDesktopClangMsvc;
|
||||
if (xSpec.contains("arm"_L1))
|
||||
return WindowsDesktopMsvcArm;
|
||||
if (xSpec.contains("G++"_L1))
|
||||
return WindowsDesktopMinGW;
|
||||
|
||||
return xSpec.contains("g++"_L1) ? WindowsDesktopMinGW : WindowsDesktopMsvcIntel;
|
||||
return WindowsDesktopMsvc;
|
||||
}
|
||||
return UnknownPlatform;
|
||||
}
|
||||
@ -1856,6 +1858,24 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
options.platform = platformFromMkSpec(xSpec);
|
||||
// We are on MSVC and not crosscompiling. We need the host arch
|
||||
if (options.platform == WindowsDesktopMsvc) {
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
switch (si.wProcessorArchitecture) {
|
||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||
case PROCESSOR_ARCHITECTURE_IA64:
|
||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
||||
options.platform |= IntelBased;
|
||||
break;
|
||||
case PROCESSOR_ARCHITECTURE_ARM:
|
||||
case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
options.platform |= ArmBased;
|
||||
break;
|
||||
default:
|
||||
options.platform = UnknownPlatform;
|
||||
}
|
||||
}
|
||||
if (options.platform == UnknownPlatform) {
|
||||
std::wcerr << "Unsupported platform " << xSpec << '\n';
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user