diff options
author | Ivan Komissarov <[email protected]> | 2025-05-21 09:50:57 +0300 |
---|---|---|
committer | Ivan Komissarov <[email protected]> | 2025-05-21 14:10:35 +0000 |
commit | 56ff04f2f266f3a4b550e59503a1a5238dea211f (patch) | |
tree | c58f709e71470b610d956c3551f4a41b20594b16 | |
parent | 9e2cbf35fe1a1d3d68ec54f610810d95eeb6c7a5 (diff) |
msvc: fix arm64/armv7 detection
Change-Id: I43ae7d240c76e092f2cfc1824621350e6e852994
Reviewed-by: Christian Kandeler <[email protected]>
-rw-r--r-- | changelogs/changes-3.0.0.md | 1 | ||||
-rw-r--r-- | share/qbs/imports/qbs/ModUtils/utils.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelogs/changes-3.0.0.md b/changelogs/changes-3.0.0.md index 164a07910..5b90c9500 100644 --- a/changelogs/changes-3.0.0.md +++ b/changelogs/changes-3.0.0.md @@ -5,6 +5,7 @@ a better idea about what is going wrong. * The JavaScript backend was switched to `QuickJS-NG`, which is actively maintained. * Added support for C++ standard library modules - "import std;" and "import std.compat;". +* Fixed support for arm64/armv7 with MSVC. # Language * Introduced new property `minimal` to `Depends` item that controls whether the diff --git a/share/qbs/imports/qbs/ModUtils/utils.js b/share/qbs/imports/qbs/ModUtils/utils.js index 3385f3617..b1f1a4212 100644 --- a/share/qbs/imports/qbs/ModUtils/utils.js +++ b/share/qbs/imports/qbs/ModUtils/utils.js @@ -510,7 +510,7 @@ function guessArchitecture(m) { var architecture; if (m) { // based on the search algorithm from qprocessordetection.h in qtbase - var arm64Defs = ["_M_ARM64", "__aarch64__", "__ARM64__"]; + var arm64Defs = ["_M_ARM64", "__aarch64__", "__ARM64__", "__ARM_ARCH_ISA_A64"]; if (hasAnyOf(m, ["__arm__", "__TARGET_ARCH_ARM", "_M_ARM"].concat(arm64Defs))) { if (hasAnyOf(m, arm64Defs)) { architecture = "arm64"; @@ -529,7 +529,7 @@ function guessArchitecture(m) { } } - if (i === 7 && m["_ARM_ARCH_7"] !== undefined) { + if (i === 7 && (m["_ARM_ARCH_7"] !== undefined || m["_M_ARM"] === "7")) { architecture += "v7"; foundSubarch = true; } |