Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qt6] Update to 6.1.1 #18320

Merged
merged 22 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/qt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt",
"version-semver": "6.1.0",
"version-semver": "6.1.1",
"description": "Qt",
"homepage": "https://www.qt.io/",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5compat/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qt5compat",
"version-semver": "6.1.0",
"version-semver": "6.1.1",
"description": "The module contains unsupported Qt 5 APIs",
"homepage": "https://www.qt.io/",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/qtactiveqt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qtactiveqt",
"version-semver": "6.1.0",
"version-semver": "6.1.1",
"description": "ActiveQt",
"homepage": "https://www.qt.io/",
"supports": "windows",
Expand Down
130 changes: 130 additions & 0 deletions ports/qtbase/20b3eb0.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
From 20b3eb0fd8b5f82cf432f2c06e7c5d3f533df0a5 Mon Sep 17 00:00:00 2001
From: Cristian Adam <cristian.adam@qt.io>
Date: Thu, 03 Jun 2021 12:42:07 +0200
Subject: [PATCH] CMake: Add support for building with clang-cl

qmake had support for building with clang-cl as the win32-clang-msvc mkspec.

Task-number: QTBUG-89642
Task-number: QTBUG-88081
Change-Id: I0709c289f90fedb121620d1e67ef841602219816
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
---

diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index bb8b146..792276e 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -285,7 +285,9 @@
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64)
endif()
if(MSVC)
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ if (CLANG)
+ set(QT_DEFAULT_MKSPEC win32-clang-msvc)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(QT_DEFAULT_MKSPEC win32-arm64-msvc)
else()
set(QT_DEFAULT_MKSPEC win32-msvc)
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 0c57d9e..0eeccce 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -235,7 +235,7 @@
function(qt_set_msvc_cplusplus_options target visibility)
# For MSVC we need to explicitly pass -Zc:__cplusplus to get correct __cplusplus.
# Check qt_config_compile_test for more info.
- if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1913)
+ if(MSVC AND MSVC_VERSION GREATER_EQUAL 1913)
target_compile_options("${target}" ${visibility} "-Zc:__cplusplus" "-permissive-")
endif()
endfunction()
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index 2c991f7..9f0c95e 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -263,4 +263,24 @@
# special case end
)

+if (MSVC AND CLANG)
+ foreach(subarch sse4_1 rdrnd rdseed)
+ if (TEST_subarch_${subarch})
+ qt_internal_add_simd_part(Core SIMD ${subarch}
+ SOURCES
+ global/qsimd.cpp
+ )
+ endif()
+ endforeach()
+
+ foreach(subarch sse4_1 aesni)
+ if (TEST_subarch_${subarch})
+ qt_internal_add_simd_part(Core SIMD ${subarch}
+ SOURCES
+ tools/qhash.cpp
+ )
+ endif()
+ endforeach()
+endif()
+
# special case begin
diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h
index 5869751..6108b07 100644
--- a/src/corelib/global/qt_pch.h
+++ b/src/corelib/global/qt_pch.h
@@ -62,17 +62,22 @@
# define _POSIX_
# include <limits.h>
# undef _POSIX_
-#endif
-#include <qcoreapplication.h>
-#include <qcoreevent.h>
-#include <qiodevice.h>
-#include <qlist.h>
-#include <qvariant.h> /* All moc genereated code has this include */
-#include <qobject.h>
-#include <qregularexpression.h>
-#include <qscopedpointer.h>
-#include <qshareddata.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+# if defined(Q_CC_CLANG) && defined(Q_CC_MSVC)
+// See https://bugs.llvm.org/show_bug.cgi?id=41226
+# include <wchar.h>
+__declspec(selectany) auto *__wmemchr_symbol_loader_value = wmemchr(L"", L'0', 0);
+# endif
+# endif
+# include <qcoreapplication.h>
+# include <qcoreevent.h>
+# include <qiodevice.h>
+# include <qlist.h>
+# include <qvariant.h> /* All moc genereated code has this include */
+# include <qobject.h>
+# include <qregularexpression.h>
+# include <qscopedpointer.h>
+# include <qshareddata.h>
+# include <qstring.h>
+# include <qstringlist.h>
+# include <qtimer.h>
#endif
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 5fe4d59..04f58dd 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -577,6 +577,15 @@
)
endif()

+ if (MSVC AND CLANG AND TEST_subarch_sse4_1)
+ qt_internal_add_simd_part(Gui SIMD sse4_1
+ SOURCES
+ painting/qdrawhelper.cpp
+ painting/qdrawhelper_sse2.cpp
+ painting/qdrawhelper_ssse3.cpp
+ )
+ endif()
+
qt_internal_add_simd_part(Gui SIMD ssse3
SOURCES
image/qimage_ssse3.cpp
13 changes: 13 additions & 0 deletions ports/qtbase/clang-cl_source_location.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 823b2057b..4a8cd4fa8 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -49,7 +49,7 @@

#include <QtCore/qpropertyprivate.h>

-#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC)
+#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_CLANG_QDOC) && defined(__cpp_consteval)
#include <source_location>
#define QT_SOURCE_LOCATION_NAMESPACE std
#define QT_PROPERTY_COLLECT_BINDING_LOCATION
30 changes: 15 additions & 15 deletions ports/qtbase/cmake/qt_install_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
#set(PORT_DEBUG ON)

if(NOT DEFINED QT6_DIRECTORY_PREFIX)
set(QT6_DIRECTORY_PREFIX "qt6/")
set(QT6_DIRECTORY_PREFIX "Qt6/")
endif()

macro(qt_stop_on_update)
Expand Down Expand Up @@ -52,12 +52,12 @@ function(qt_install_submodule)

if(VCPKG_TARGET_IS_WINDOWS)
if(NOT ${PORT} MATCHES "qtbase")
list(APPEND _qis_CONFIGURE_OPTIONS -DQT_SYNCQT:PATH="${CURRENT_HOST_INSTALLED_DIR}/tools/qt6/bin/syncqt.pl")
list(APPEND _qis_CONFIGURE_OPTIONS -DQT_SYNCQT:PATH="${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl")
endif()
set(PERL_OPTION -DHOST_PERL:PATH="${PERL}")
else()
if(NOT ${PORT} MATCHES "qtbase")
list(APPEND _qis_CONFIGURE_OPTIONS -DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/qt6/bin/syncqt.pl)
list(APPEND _qis_CONFIGURE_OPTIONS -DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl)
endif()
set(PERL_OPTION -DHOST_PERL:PATH=${PERL})
endif()
Expand Down Expand Up @@ -97,16 +97,16 @@ function(qt_install_submodule)
${_qis_CONFIGURE_OPTIONS_RELEASE}
-DINSTALL_DOCDIR:STRING=doc/${QT6_DIRECTORY_PREFIX}
-DINSTALL_INCLUDEDIR:STRING=include/${QT6_DIRECTORY_PREFIX}
-DINSTALL_DESCRIPTIONSDIR:STRING=share/qt6/modules
-DINSTALL_MKSPECSDIR:STRING=share/qt6/mkspecs
-DINSTALL_DESCRIPTIONSDIR:STRING=share/Qt6/modules
-DINSTALL_MKSPECSDIR:STRING=share/Qt6/mkspecs
-DINSTALL_TRANSLATIONSDIR:STRING=translations/${QT6_DIRECTORY_PREFIX}
OPTIONS_DEBUG
-DINPUT_debug:BOOL=ON
-DINSTALL_DOCDIR:STRING=../doc/${QT6_DIRECTORY_PREFIX}
-DINSTALL_INCLUDEDIR:STRING=../include/${QT6_DIRECTORY_PREFIX}
-DINSTALL_TRANSLATIONSDIR:STRING=../translations/${QT6_DIRECTORY_PREFIX}
-DINSTALL_DESCRIPTIONSDIR:STRING=../share/qt6/modules
-DINSTALL_MKSPECSDIR:STRING=../share/qt6/mkspecs
-DINSTALL_DESCRIPTIONSDIR:STRING=../share/Qt6/modules
-DINSTALL_MKSPECSDIR:STRING=../share/Qt6/mkspecs
${_qis_CONFIGURE_OPTIONS_DEBUG}
)
vcpkg_install_cmake(ADD_BIN_TO_PATH)
Expand All @@ -115,7 +115,7 @@ function(qt_install_submodule)
## Handle CMake files.
set(COMPONENTS)
file(GLOB COMPONENTS_OR_FILES LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/share/Qt6*")
list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/qt6")
list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6")
foreach(_glob IN LISTS COMPONENTS_OR_FILES)
if(IS_DIRECTORY "${_glob}")
string(REPLACE "${CURRENT_PACKAGES_DIR}/share/Qt6" "" _component "${_glob}")
Expand All @@ -126,7 +126,7 @@ function(qt_install_submodule)

foreach(_comp IN LISTS COMPONENTS)
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}")
vcpkg_fixup_cmake_targets(CONFIG_PATH share/Qt6${_comp} TARGET_PATH share/Qt6${_comp} TOOLS_PATH "tools/qt6/bin")
vcpkg_fixup_cmake_targets(CONFIG_PATH share/Qt6${_comp} TARGET_PATH share/Qt6${_comp} TOOLS_PATH "tools/Qt6/bin")
# Would rather put it into share/cmake as before but the import_prefix correction in vcpkg_fixup_cmake_targets is working against that.
else()
message(STATUS "WARNING: Qt component ${_comp} not found/built!")
Expand All @@ -150,7 +150,7 @@ function(qt_install_submodule)
endforeach()
endif()

set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/qt6/bin")
set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
set(qt_searchdir "${CURRENT_PACKAGES_DIR}/bin")
## Handle Tools
foreach(_tool IN LISTS _qis_TOOL_NAMES)
Expand All @@ -169,17 +169,17 @@ function(qt_install_submodule)

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/")
file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt6/bin")
file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
endif()
file(GLOB_RECURSE _installed_dll_files RELATIVE "${CURRENT_INSTALLED_DIR}/tools/qt6/bin" "${CURRENT_INSTALLED_DIR}/tools/qt6/bin/*.dll")
file(GLOB_RECURSE _installed_dll_files RELATIVE "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/*.dll")
foreach(_dll_to_remove IN LISTS _installed_dll_files)
file(GLOB_RECURSE _packaged_dll_file "${CURRENT_PACKAGES_DIR}/tools/qt6/bin/${_dll_to_remove}")
file(GLOB_RECURSE _packaged_dll_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${_dll_to_remove}")
if(EXISTS "${_packaged_dll_file}")
file(REMOVE "${_packaged_dll_file}")
endif()
endforeach()
file(GLOB_RECURSE _folders LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/tools/qt6/bin/**/")
file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/qt6/bin/**/")
file(GLOB_RECURSE _folders LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/")
file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/")
if(_files)
list(REMOVE_ITEM _folders ${_files})
endif()
Expand Down
51 changes: 26 additions & 25 deletions ports/qtbase/cmake/qt_port_details.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(QT_VERSION 6.1.0)
set(QT_VERSION 6.1.1)
set(QT_GIT_TAG v${QT_VERSION})
#set(QT_UPDATE_VERSION TRUE)

Expand Down Expand Up @@ -30,36 +30,37 @@ set(QT_PORTS qtbase
qtscxml
qtvirtualkeyboard
qtcharts
qt
)

foreach(_port IN LISTS QT_PORTS)
set(${_port}_TAG ${QT_GIT_TAG})
endforeach()

set(qtbase_REF 80a246a982e1c332f074f35a365d453c932ccd4e)
set(qttools_REF 59ba188f13fa01e8590899ecbda47d2680929856)
set(qtdeclarative_REF cb6675c5d314c05fb16fe2b9c555cc6a2c488bed)
set(qtsvg_REF 5bf7d6f7b91a2cb79910cb42afcffddff1ed838b)
set(qt5compat_REF 752f10fa6f84b8b2b738e46efacbce32125efbb6)
set(qtshadertools_REF bcf88361f7a96f02f6c8f77a7fdf8abefae21df4)
set(qtquicktimeline_REF d13e054604a24cd88edb92d3e85529f8c8ea631f)
set(qtquick3d_REF b3fd7feee9a6350580203935dea7b221de67e4b2)
set(qttranslations_REF e69b51751a9ec8c5d45661b83981297c432d0d57)
set(qtwayland_REF e22789176e48314be1cbea5d12366eb77a220425)
set(qtdoc_REF a8448c0b87376598a64333266f5acccd05e7a1e9)
set(qtimageformats_REF 2a6985b6e73be2b9f371938ca826430be13f55fd)
set(qtmqtt_REF 40502be35ca30025b45570574d4ee0f0b6bada2d)
set(qtquickcontrols2_REF 104555a8682d4095841feb9b02c9fd223c707b8e)
set(qtnetworkauth_REF 0e055a0ace5705d7a162236bf375b057e9ca124e)
set(qtcoap_REF f09ed2ed8078dee75b5e7682b5832b2cee80c3b0)
set(qtopcua_REF 592ef6d24e8ebee0a35b0e46653f3e5b4f4f2d13)
set(qtactiveqt_REF 64e781f88e6758826be73751fe547b7e03c82edd)
set(qtdatavis3d_REF 6c79c3c0cd01ec29ce410e557aef293295349a22)
set(qtbase_REF 9461362fb0aa5ec91bcfafe1169bd32cf9cfc828)
set(qttools_REF 3fa59b12c7e23e0eb3fbb0f3a9d3f7fee2669f72)
set(qtdeclarative_REF 34d723b38ef9b2ef851f589dfd0523420f4c5acc)
set(qtsvg_REF 242d6a797b6051baccd101978f3e138293701159)
set(qt5compat_REF 57202ccee96b7297202ba11c867178cff32b6eef)
set(qtshadertools_REF 954b90fa332b37ba1b60a2fcd92c06a0de6a6322)
set(qtquicktimeline_REF 2cb89aa7b120ec0ac84426d9f50bf8c613bbcd1e)
set(qtquick3d_REF 6c5ec5b14829f4181d035ad357f594e32e0e4119)
set(qttranslations_REF 47deef3a86795ef97708ec1da403a06cf696ec1c)
set(qtwayland_REF f2c5c1304fc1a5123243a3a83ac8d8f3f67138ca)
set(qtdoc_REF 097bdcbf52a3cd798b66318f2b453cd01640e06b)
set(qtimageformats_REF 6cd036f63ff4b939f2ceb02fda98303a89a1b4b1)
set(qtmqtt_REF d5c00c7245916a919b408578a6dd17bfac0e064d)
set(qtquickcontrols2_REF 1d84dc70059a6e324faab3535cb3958c6fa52fab)
set(qtnetworkauth_REF a903abe7e43123ecd727ca2e29d552c5ed639552)
set(qtcoap_REF 160c3fb6850be44c09142150aef165a09946a608)
set(qtopcua_REF c025fe5182a369723a67be06d64cbfbf2760ba0e)
set(qtactiveqt_REF b9cf1840e44d5283f2212a73ba7b74ec18564d5a)
set(qtdatavis3d_REF 1629d860192ffc644a5c0c7d63e18a6ee6d5e295)
#set(qtdeviceutils_REF 0) #missing tag
set(qtlottie_REF a8c5919df0c6fb9904920d20c4bb0ea18bcaba94)
set(qtscxml_REF fb5dedff2f1ddbeeba680c4cf297525c0fd85652)
set(qtvirtualkeyboard_REF 66a0ecd2db90097fe961437e539182ee5ef17b33)
set(qtcharts_REF 0e713697ab2454b1c870cb750510b280f8059b0e)
set(qtlottie_REF f6a4557b1484b9ad7db4bae8c5b6b264618876e5)
set(qtscxml_REF 666adc604fec06fa5b38be4d4f1b0e9b56f16c2b)
set(qtvirtualkeyboard_REF 5c7df0c55a96e9855bd27c23a18d6f2d91305d31)
set(qtcharts_REF 251d18d960a6f6ee04f07ba338beb317c425e0a2)

if(QT_UPDATE_VERSION)
message(STATUS "Running Qt in automatic version port update mode!")
Expand All @@ -68,7 +69,7 @@ if(QT_UPDATE_VERSION)
foreach(_current_qt_port IN LISTS QT_PORTS)
set(_current_control "${VCPKG_ROOT_DIR}/ports/${_current_qt_port}/vcpkg.json")
file(READ "${_current_control}" _control_contents)
string(REGEX REPLACE "\"version-string\": [^\n]+\n" "\"version-string\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}")
string(REGEX REPLACE "\"version-(string|semver)\": [^\n]+\n" "\"version-semver\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}")
file(WRITE "${_current_control}" "${_control_contents}")
#need to run a vcpkg format-manifest --all after update once
endforeach()
Expand Down
22 changes: 22 additions & 0 deletions ports/qtbase/dc5e7b6.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 0eeccce..2ee41c2 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -421,7 +421,7 @@
# cache variable with FORCE will overwrite the non-cache variable in this
# function scope, but we need to use the original value before that change.
foreach(flag_value IN LISTS flag_values)
- string(${replace_type} "${flag_value}" "" ${flag_var_name} "${${flag_var_name}}")
+ string(${replace_type} "${flag_value}" " " ${flag_var_name} "${${flag_var_name}}")
endforeach()
string(STRIP "${${flag_var_name}}" ${flag_var_name})
set(${flag_var_name} "${${flag_var_name}}" PARENT_SCOPE)
@@ -433,7 +433,7 @@
# Work exclusively on cache variable value only.
set(mod_flags $CACHE{${flag_var_name}})
foreach(flag_value IN LISTS flag_values)
- string(${replace_type} "${flag_value}" "" mod_flags "${mod_flags}")
+ string(${replace_type} "${flag_value}" " " mod_flags "${mod_flags}")
endforeach()
string(STRIP "${mod_flags}" mod_flags)
get_property(help_text CACHE ${flag_var_name} PROPERTY HELPSTRING)
Loading