Skip to content

Commit

Permalink
[qt5-base & qtbase] Fix error on arm64-windows (#41536)
Browse files Browse the repository at this point in the history
Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com>
  • Loading branch information
pedrolcl and MonicaLiu0311 authored Oct 24, 2024
1 parent f56b56e commit 1d6bcca
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 2 deletions.
18 changes: 18 additions & 0 deletions ports/qt5-base/patches/qmake-arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index df3f92d7d5df..0ee8cdbf11e1 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1046,6 +1046,11 @@ void QMakeEvaluator::loadDefaults()
case PROCESSOR_ARCHITECTURE_AMD64:
archStr = ProString("x86_64");
break;
+# endif
+# ifdef PROCESSOR_ARCHITECTURE_ARM64
+ case PROCESSOR_ARCHITECTURE_ARM64:
+ archStr = ProString("arm64");
+ break;
# endif
case PROCESSOR_ARCHITECTURE_INTEL:
archStr = ProString("x86");
--
2.16.3
2 changes: 2 additions & 0 deletions ports/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
patches/fix_angle.patch # Failed to create OpenGL context for format QSurfaceFormat ...
patches/mingw9.patch # Fix compile with MinGW-W64 9.0.0: Redefinition of 'struct _FILE_ID_INFO'
patches/XKB_KEY_dead_lowline.patch # https://bugreports.qt.io/browse/QTBUG-117950

patches/qmake-arm64.patch # Fix by Oliver Wolff to support ARM64 hosts on Windows
)

# Remove vendored dependencies to ensure they are not picked up by the build
Expand Down
1 change: 1 addition & 0 deletions ports/qt5-base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qt5-base",
"version": "5.15.15",
"port-version": 1,
"description": "Qt Base provides the basic non-GUI functionality required by all Qt applications.",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
1 change: 1 addition & 0 deletions ports/qtbase/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set(${PORT}_PATCHES
fix-host-aliasing.patch
fix_deploy_windows.patch
fix-link-lib-discovery.patch
qmake-arm64.patch
)

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
Expand Down
18 changes: 18 additions & 0 deletions ports/qtbase/qmake-arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index df3f92d7d5df..0ee8cdbf11e1 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1046,6 +1046,11 @@ void QMakeEvaluator::loadDefaults()
case PROCESSOR_ARCHITECTURE_AMD64:
archStr = ProString("x86_64");
break;
+# endif
+# ifdef PROCESSOR_ARCHITECTURE_ARM64
+ case PROCESSOR_ARCHITECTURE_ARM64:
+ archStr = ProString("arm64");
+ break;
# endif
case PROCESSOR_ARCHITECTURE_INTEL:
archStr = ProString("x86");
--
2.16.3
1 change: 1 addition & 0 deletions ports/qtbase/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtbase",
"version": "6.7.3",
"port-version": 1,
"description": "Qt Base (Core, Gui, Widgets, Network, ...)",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7342,7 +7342,7 @@
},
"qt5-base": {
"baseline": "5.15.15",
"port-version": 0
"port-version": 1
},
"qt5-canvas3d": {
"baseline": "0",
Expand Down Expand Up @@ -7510,7 +7510,7 @@
},
"qtbase": {
"baseline": "6.7.3",
"port-version": 0
"port-version": 1
},
"qtcharts": {
"baseline": "6.7.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6ae808ff9831e8fc3c9f31e0ec0ac71b2e9d3a4e",
"version": "5.15.15",
"port-version": 1
},
{
"git-tree": "99dfc2c88d6a863afc5eef00463166c50e5e12d2",
"version": "5.15.15",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtbase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f176facc532ba6e294f1627343e8f7c3ee686676",
"version": "6.7.3",
"port-version": 1
},
{
"git-tree": "175c7c5f08049a07e1b18f39e622e82a60a16147",
"version": "6.7.3",
Expand Down

0 comments on commit 1d6bcca

Please sign in to comment.