summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf10
-rw-r--r--mkspecs/features/android/default_pre.prf2
-rw-r--r--mkspecs/features/android/sdk.prf2
-rw-r--r--mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in2
-rwxr-xr-xmkspecs/features/data/mac/objc_namespace.sh142
-rw-r--r--mkspecs/features/data/unix/findclasslist.pl42
-rw-r--r--mkspecs/features/default_post.prf12
-rw-r--r--mkspecs/features/lrelease.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf32
-rw-r--r--mkspecs/features/mac/default_pre.prf21
-rw-r--r--mkspecs/features/mac/sdk.mk2
-rw-r--r--mkspecs/features/qt.prf27
-rw-r--r--mkspecs/features/qt_common.prf2
-rw-r--r--mkspecs/features/qt_docs.prf14
-rw-r--r--mkspecs/features/qt_targets.prf2
-rw-r--r--mkspecs/features/toolchain.prf11
-rwxr-xr-xmkspecs/features/uikit/device_destinations.sh44
-rwxr-xr-xmkspecs/features/uikit/devices.py46
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk12
-rw-r--r--mkspecs/features/uikit/xcodebuild.prf8
-rw-r--r--mkspecs/features/win32/separate_debug_info.prf6
-rw-r--r--mkspecs/features/winrt/package_manifest.prf3
22 files changed, 284 insertions, 160 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index b77d1f2653..8437e1542b 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -78,8 +78,14 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
contains(resource, ".*qmake_qmake_immediate\\.qrc$") {
# They will be created for each architecture, since they could be different
# we need to account for all of them
- for (arch, ANDROID_ABIS): \
- rescopy += $$absolute_path("qmake_qmake_immediate.qrc", $$OUT_PWD/$$arch)
+ qmake_qrc_path = "qmake_qmake_immediate.qrc"
+ base_out_path = $$OUT_PWD/$$RCC_DIR
+ multi_android_abi {
+ for (arch, ANDROID_ABIS): \
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path/$$arch)
+ } else {
+ rescopy += $$absolute_path($$qmake_qrc_path, $$base_out_path)
+ }
} else {
contains(resource, ".*\\.qrc$"): rescopy += $$absolute_path($$resource, $$_PRO_FILE_PWD_)
}
diff --git a/mkspecs/features/android/default_pre.prf b/mkspecs/features/android/default_pre.prf
index 9f90dcb391..2328b728ac 100644
--- a/mkspecs/features/android/default_pre.prf
+++ b/mkspecs/features/android/default_pre.prf
@@ -76,8 +76,6 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-
-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib
-QMAKE_LINK_SHLIB = $$QMAKE_LINK
QMAKE_LFLAGS =
QMAKE_LIBS_PRIVATE = -llog -lz -lm -ldl -lc
diff --git a/mkspecs/features/android/sdk.prf b/mkspecs/features/android/sdk.prf
index 463d399a21..83428ae7d7 100644
--- a/mkspecs/features/android/sdk.prf
+++ b/mkspecs/features/android/sdk.prf
@@ -1,6 +1,6 @@
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
-isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-28
+isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-31
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
index 2e23109167..b465a7fa89 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
@@ -87,7 +87,7 @@ string(CONCAT _plugin_genex
# Add this plugin if all of the following are true:
# 1) the list of explicitly included plugin types is empty
# 2) the QT_PLUGIN_EXTENDS property for the plugin is empty or equal to one of the modules
- # listed in the plugin's PLUGIN_EXTEND qmake variable
+ # listed in the plugin\'s PLUGIN_EXTEND qmake variable
# 3) the user hasn\'t explicitly excluded the plugin.
# TODO: Note that the current implementation of (2) is not entirely correct QTBUG-93501
\"$<AND:\"
diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh
index 1614473406..b24c5f071c 100755
--- a/mkspecs/features/data/mac/objc_namespace.sh
+++ b/mkspecs/features/data/mac/objc_namespace.sh
@@ -2,13 +2,12 @@
#############################################################################
##
-## Copyright (C) 2021 The Qt Company Ltd.
+## Copyright (C) 2017 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:COMM$
-##
+## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
@@ -17,32 +16,33 @@
## and conditions see https://www.qt.io/terms-conditions. For further
## information use the contact form at https://www.qt.io/contact-us.
##
-## $QT_END_LICENSE$
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
##
+## $QT_END_LICENSE$
##
-############################################################################
+#############################################################################
script_argument_prefix="-Wobjc_namespace,--"
required_arguments="target suffix original_ld"
-optional_arguments="exclude_list exclude_regex slient"
+optional_arguments="exclude_list exclude_regex silent"
for argument in $required_arguments $optional_arguments; do
declare "$argument="
@@ -100,11 +100,13 @@ sanitize_address() {
echo "0x$address"
}
+arch_offset=0
read_binary() {
local address=$1
local length=$2
- dd if="$target" bs=1 iseek=$address count=$length 2>|/dev/null
+ seek=$(($address + $arch_offset))
+ dd if="$target" bs=1 iseek=$seek count=$length 2>|/dev/null
}
read_32bit_value() {
@@ -112,23 +114,23 @@ read_32bit_value() {
read_binary $address 4 | xxd -p | dd conv=swab 2>/dev/null | rev
}
-inspect_binary() {
- inspect_mode="$1"
+otool_args=
+otool() {
+ command otool $otool_args "$@"
+}
- echo -n "🔎 Inspecting binary '$target', "
- if [ ! -f "$target" ]; then
- echo "target does not exist!"
- exit 1
- fi
+declare -a extra_classnames_files
- read -a mach_header <<< "$(otool -h "$target" -v | tail -n 1)"
- if [ "${mach_header[1]}" != "X86_64" ]; then
- echo "binary is not 64-bit, only 64-bit binaries are supported!"
- exit 1
- fi
+inspect_binary() {
+ inspect_mode="$1"
classnames_section="__objc_classname"
classnames=$(otool -v -s __TEXT $classnames_section "$target" | tail -n +3)
+ if [ -z "$classnames" ]; then
+ echo " ℹī¸ No Objective-C classes found in binary"
+ return 1
+ fi
+
while read -a classname; do
address=$(sanitize_address ${classname[0]})
name=${classname[1]}
@@ -138,21 +140,26 @@ inspect_binary() {
done <<< "$classnames"
extra_classnames_file="$(mktemp -t ${classnames_section}_additions).S"
+ extra_classnames_files+=("$extra_classnames_file")
if [ "$inspect_mode" == "inject_classnames" ]; then
- echo "class names have not been namespaced, adding suffix '$suffix'..."
+ echo " ℹī¸ Class names have not been namespaced, adding suffix '$suffix'..."
printf ".section __TEXT,$classnames_section,cstring_literals,no_dead_strip\n" > $extra_classnames_file
elif [ "$inspect_mode" == "patch_classes" ]; then
- echo "found namespaced class names, updating class entries..."
+ echo " ℹī¸ Found namespaced class names, updating class entries..."
+ fi
+
+ classes=$(otool -o -v "$target" | grep "OBJC_CLASS_RO\|OBJC_METACLASS_RO")
+ if [ -z "$classes" ]; then
+ echo " đŸ’Ĩ Failed to read class entries from binary"
+ exit 1
fi
- classes=$(otool -o -v "$target" | grep class_ro_t)
while read -a class; do
address="$(sanitize_address ${class[1]})"
-
class_flags="0x$(read_32bit_value $address)"
if [ -z "$class_flags" ]; then
- echo " đŸ’Ĩ failed to read class flags for class at $address"
+ echo " đŸ’Ĩ Failed to read class flags for class at $address"
continue
fi
@@ -161,13 +168,13 @@ inspect_binary() {
name_offset=$(($address + 24))
classname_address="0x$(read_32bit_value $name_offset)"
if [ -z "$classname_address" ]; then
- echo " đŸ’Ĩ failed to read class name address for class at $address"
+ echo " đŸ’Ĩ Failed to read class name address for class at $address"
continue
fi
classname=$(get_entry address_to_classname $classname_address)
if [ -z "$classname" ]; then
- echo " đŸ’Ĩ failed to resolve class name for address '$classname_address'"
+ echo " đŸ’Ĩ Failed to resolve class name for address '$classname_address'"
continue
fi
@@ -177,7 +184,7 @@ inspect_binary() {
else
class_type="class"
fi
- echo " đŸšŊ skipping excluded $class_type '$classname'"
+ echo " đŸšŊ Skipping excluded $class_type '$classname'"
continue
fi
@@ -188,13 +195,13 @@ inspect_binary() {
continue
fi
- echo " 💉 injecting $classnames_section entry '$newclassname' for '$classname'"
+ echo " 💉 Injecting $classnames_section entry '$newclassname' for '$classname'"
printf ".asciz \"$newclassname\"\n" >> $extra_classnames_file
elif [ "$inspect_mode" == "patch_classes" ]; then
newclassname_address=$(get_entry classname_to_address ${newclassname})
if [ -z "$newclassname_address" ]; then
- echo " đŸ’Ĩ failed to resolve class name address for class '$newclassname'"
+ echo " đŸ’Ĩ Failed to resolve class name address for class '$newclassname'"
continue
fi
@@ -204,7 +211,9 @@ inspect_binary() {
class_type="class"
fi
- echo " 🔨 patching class_ro_t at $address ($class_type) from $classname_address ($classname) to $newclassname_address ($newclassname)"
+ name_offset=$(($name_offset + $arch_offset))
+
+ echo " 🔨 Patching class_ro_t at $address ($class_type) from $classname_address ($classname) to $newclassname_address ($newclassname)"
echo ${newclassname_address: -8} | rev | dd conv=swab 2>/dev/null | xxd -p -r -seek $name_offset -l 4 - "$target"
fi
done <<< "$classes"
@@ -213,10 +222,43 @@ inspect_binary() {
echo "🔩 Linking binary using '$original_ld'..."
link_binary
-inspect_binary inject_classnames
+echo "🔎 Inspecting binary '$target'..."
+if [ ! -f "$target" ]; then
+ echo " đŸ’Ĩ Target does not exist!"
+ exit 1
+fi
+
+read -a mach_header <<< "$(otool -h "$target" -v | tail -n 1)"
+if [ "${mach_header[0]}" != "MH_MAGIC_64" ]; then
+ echo " đŸ’Ĩ Binary is not 64-bit, only 64-bit binaries are supported!"
+ exit 1
+fi
+
+architectures=$(otool -f -v "$target" | grep architecture)
+
+setup_arch() {
+ arch="$1"
+ if [ ! -z "$arch" ]; then
+ otool_args="-arch $arch"
+ offset=$(otool -f -v "$target" | grep -A 6 "architecture $arch" | grep offset)
+ offset="${offset##*( )}"
+ arch_offset="$(echo $offset | cut -d ' ' -f 2)"
+ echo "🤖 Processing architecture '$arch' at offset $arch_offset..."
+ fi
+}
-echo "🔩 Re-linking binary with extra __objc_classname section..."
-link_binary $extra_classnames_file
+while read -a arch; do
+ setup_arch "${arch[1]}"
+ inspect_binary inject_classnames
+ if [ $? -ne 0 ]; then
+ exit
+ fi
+done <<< "$architectures"
-inspect_binary patch_classes
+echo "🔩 Re-linking binary with extra __objc_classname section(s)..."
+link_binary "${extra_classnames_files[@]}"
+while read -a arch; do
+ setup_arch "${arch[1]}"
+ inspect_binary patch_classes
+done <<< "$architectures"
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl
index c3bf7d3a8f..b74b8b6a58 100644
--- a/mkspecs/features/data/unix/findclasslist.pl
+++ b/mkspecs/features/data/unix/findclasslist.pl
@@ -6,8 +6,7 @@
##
## This file is part of the build configuration tools of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:COMM$
-##
+## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
@@ -16,27 +15,28 @@
## and conditions see https://www.qt.io/terms-conditions. For further
## information use the contact form at https://www.qt.io/contact-us.
##
-## $QT_END_LICENSE$
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
##
+## $QT_END_LICENSE$
##
-############################################################################
+#############################################################################
use strict;
my $syntax = "findclasslist.pl\n" .
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 1d79f5c958..ac799047ab 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -122,17 +122,18 @@ breakpad {
}
c++17: CONFIG += c++1z
-c++latest: CONFIG *= c++2a c++1z c++14 c++11
+c++latest: CONFIG *= c++2b c++2a c++1z c++14 c++11
-!c++11:!c++14:!c++1z:!c++2a {
+!c++11:!c++14:!c++1z:!c++2a:!c++2b {
# Qt requires C++11 since 5.7, check if we need to force a compiler option
QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "")
!greaterThan(QT_COMPILER_STDCXX_no_L, 199711): CONFIG += c++11
}
-c++11|c++14|c++1z|c++2a {
+c++11|c++14|c++1z|c++2a|c++2b {
# Disable special compiler flags for host builds
!host_build|!cross_compile {
- c++2a: cxxstd = CXX2A
+ c++2b: cxxstd = CXX2B
+ else: c++2a: cxxstd = CXX2A
else: c++1z: cxxstd = CXX1Z
else: c++14: cxxstd = CXX14
else: cxxstd = CXX11
@@ -155,7 +156,8 @@ c++11|c++14|c++1z|c++2a {
unset(cxxstd)
}
-c99|c11 {
+c99|c11|c17|c18 {
+ c17|c18: cstd = C17
c11: cstd = C11
else: cstd = C99
diff --git a/mkspecs/features/lrelease.prf b/mkspecs/features/lrelease.prf
index f611c74184..15d336d8e5 100644
--- a/mkspecs/features/lrelease.prf
+++ b/mkspecs/features/lrelease.prf
@@ -24,7 +24,7 @@ all_translations = $$TRANSLATIONS $$EXTRA_TRANSLATIONS
for (translation, all_translations) {
# mirrors $$LRELEASE_DIR/${QMAKE_FILE_IN_BASE}.qm above
translation = $$basename(translation)
- QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\..*$, .qm)
+ QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\.[^.]+$, .qm)
}
embed_translations {
qmake_qm_files.files = $$QM_FILES
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 4020f68895..abc6d82ade 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -34,7 +34,7 @@ contains(TEMPLATE, .*app) {
!sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
- "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_MINOR_VERSION}.")
+ "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.")
warning("This is an unsupported configuration. You may experience build issues," \
"and by using")
warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \
@@ -95,6 +95,19 @@ app_extension_api_only {
QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
}
+macos {
+ !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+ # If the user has requested a specific set of architectures,
+ # build all of those by default, but limited to only those.
+ CONFIG -= only_active_arch
+ } else {
+ # Otherwise allow building all of the architectures available
+ # in Qt, but only build the active arch (unless the user has
+ # manually overridden this via CONFIG -= only_active_arch).
+ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS
+ }
+}
+
macx-xcode {
qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
!isEmpty(QMAKE_PKGINFO_TYPEINFO): \
@@ -150,15 +163,20 @@ macx-xcode {
simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
- isEmpty(VALID_ARCHS): \
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
-
single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+ macos {
+ only_active_arch: DEFAULT_ARCHS = $$system("uname -m")
+ else: DEFAULT_ARCHS = $$VALID_ARCHS
+ }
+
+ ARCHS = $(filter $(EXPORT_VALID_ARCHS), \
+ $(if $(ARCHS), $(ARCHS), \
+ $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \
+ $(EXPORT_VALID_ARCHS))))
+ ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
+ QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS
arch_flags = $(EXPORT_ARCH_ARGS)
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index e3534561a5..2c91ba6679 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,4 +1,25 @@
CONFIG = asset_catalogs rez $$CONFIG
+
+macos {
+ count(QT_ARCHS, 1, >) {
+ # For universal builds all the config tests are run with the first
+ # architecture (as reflected by QT_ARCH). We have to manually enable
+ # CPU features we know exist on the secondary architecture. For
+ # simplicity we just hard-code the base features we know exist.
+ # Note that this hack means we end up with QT_CPU_FEATURES.x86_64
+ # containing neon, and QT_CPU_FEATURES.arm64 containing sse2 e.g.
+ QT_CPU_FEATURES.$$QT_ARCH += sse sse2
+ CONFIG += sse sse2
+ DEFINES += QT_COMPILER_SUPPORTS_SSE2
+ # FIXME: For x86_64 there are a bunch more. If building a universal
+ # build with arm64 as the primary architecture we'll miss those.
+
+ QT_CPU_FEATURES.$$QT_ARCH += neon
+ CONFIG += neon
+ DEFINES += QT_COMPILER_SUPPORTS_NEON
+ }
+}
+
load(default_pre)
isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk
index f30b5830b4..a32ceacb6c 100644
--- a/mkspecs/features/mac/sdk.mk
+++ b/mkspecs/features/mac/sdk.mk
@@ -1,6 +1,6 @@
ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),)
- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>&1
+ CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null
CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND))
ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
# We don't want to complain about out of date SDK unless the target needs to be remade.
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 69d1954306..da1f44a88a 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -215,13 +215,32 @@ for(ever) {
# Linking frameworks by absolute path does not work.
LIBS$$var_sfx += -framework $$framework
} else {
- lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+ candidates = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+ darwin: candidates *= $$MODULE_MODULE
win32|contains(MODULE_CONFIG, staticlib) {
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
- PRE_TARGETDEPS += $$lib
+ lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB
+ lib_suffix = $$QMAKE_EXTENSION_STATICLIB
+ add_lib_to_pretargetdeps = true
} else {
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
+ lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB
+ lib_suffix = $$QMAKE_EXTENSION_SHLIB
+ add_lib_to_pretargetdeps = false
+ }
+ lib_missing = true
+ lib_fallback =
+ for(lib_base, candidates) {
+ lib = $${lib_prefix}$${lib_base}.$${lib_suffix}
+ isEmpty(lib_fallback): \
+ lib_fallback = $$lib
+ exists($$lib) {
+ lib_missing = false
+ break()
+ }
}
+ $$lib_missing: \
+ lib = $$lib_fallback
+ $$add_lib_to_pretargetdeps: \
+ PRE_TARGETDEPS += $$lib
LIBS$$var_sfx += $$lib
}
}
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 269ec11be1..aed52752b7 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -18,6 +18,7 @@ qtConfig(c++11): CONFIG += c++11 strict_c++
qtConfig(c++14): CONFIG += c++14
qtConfig(c++1z): CONFIG += c++1z
qtConfig(c++2a): CONFIG += c++2a
+qtConfig(c++2b): CONFIG += c++2b
qtConfig(c99): CONFIG += c99
qtConfig(c11): CONFIG += c11
qtConfig(separate_debug_info): CONFIG += separate_debug_info
@@ -158,4 +159,3 @@ warnings_are_errors:warning_clean {
}
unset(ver)
}
-
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index 095bf15dac..e19d06f788 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -29,20 +29,20 @@ QT_TOOL_ENV =
# On Windows, put the includes into a .inc file which QDoc will read, if the project
# has too many includes. We do this to overcome a command-line limit on Windows.
-WIN_INCLUDETEMP=
+QDOC_WIN_INCLUDETEMP=
INCLUDE_PATHS=$$INCPATH
win32:count(INCLUDE_PATHS, 30, >) {
- WIN_INCLUDETEMP = $$OUT_PWD/qdocincludepaths.inc
- WIN_INCLUDETEMP_CONTENT =
+ QDOC_WIN_INCLUDETEMP = $$OUT_PWD/qdocincludepaths.inc
+ QDOC_WIN_INCLUDETEMP_CONTENT =
for (inc, INCLUDE_PATHS): \
- WIN_INCLUDETEMP_CONTENT += -I$$inc
- write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONTENT)|error()
+ QDOC_WIN_INCLUDETEMP_CONTENT += -I$$inc
+ write_file($$absolute_path($$QDOC_WIN_INCLUDETEMP, $$OUT_PWD), QDOC_WIN_INCLUDETEMP_CONTENT)|error()
}
-isEmpty(WIN_INCLUDETEMP) {
+isEmpty(QDOC_WIN_INCLUDETEMP) {
QDOC_INCLUDE_PATHS=$(INCPATH)
} else {
- QDOC_INCLUDE_PATHS=@$$shell_quote($$WIN_INCLUDETEMP)
+ QDOC_INCLUDE_PATHS=@$$shell_quote($$QDOC_WIN_INCLUDETEMP)
}
macos: QDOC_INCLUDE_PATHS += $$join(QMAKE_DEFAULT_INCDIRS," -I","-I")
diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf
index 3810d1e0ad..b6fedd30e9 100644
--- a/mkspecs/features/qt_targets.prf
+++ b/mkspecs/features/qt_targets.prf
@@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
-QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 The Qt Company Ltd.
+QMAKE_TARGET_COPYRIGHT = Copyright (C) 2023 The Qt Company Ltd.
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 11ecd6b2a5..0c505fc965 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) {
# UIKit simulator platforms will see the device SDK's sysroot in
# QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass.
darwin {
- # Clang doesn't pick up the architecture from the sysroot, and will
- # default to the host architecture, so we need to manually set it.
- cxx_flags += -arch $$QMAKE_APPLE_DEVICE_ARCHS
+ uikit {
+ # Clang doesn't automatically pick up the architecture, just because
+ # we're passing the iOS sysroot below, and we will end up building the
+ # test for the host architecture, resulting in linker errors when
+ # linking against the iOS libraries. We work around this by passing
+ # the architecture explicitly.
+ cxx_flags += -arch $$first(QMAKE_APPLE_DEVICE_ARCHS)
+ }
uikit:macx-xcode: \
cxx_flags += -isysroot $$sdk_path_device.value
diff --git a/mkspecs/features/uikit/device_destinations.sh b/mkspecs/features/uikit/device_destinations.sh
index df4e25c90b..649dd399a7 100755
--- a/mkspecs/features/uikit/device_destinations.sh
+++ b/mkspecs/features/uikit/device_destinations.sh
@@ -2,13 +2,12 @@
#############################################################################
##
-## Copyright (C) 2021 The Qt Company Ltd.
+## Copyright (C) 2016 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:COMM$
-##
+## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
@@ -17,27 +16,28 @@
## and conditions see https://www.qt.io/terms-conditions. For further
## information use the contact form at https://www.qt.io/contact-us.
##
-## $QT_END_LICENSE$
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
##
+## $QT_END_LICENSE$
##
-############################################################################
+#############################################################################
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
scheme=$1
diff --git a/mkspecs/features/uikit/devices.py b/mkspecs/features/uikit/devices.py
index 4bf5acc998..5f2bd5dff2 100755
--- a/mkspecs/features/uikit/devices.py
+++ b/mkspecs/features/uikit/devices.py
@@ -1,14 +1,13 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
#############################################################################
##
-## Copyright (C) 2021 The Qt Company Ltd.
+## Copyright (C) 2017 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:COMM$
-##
+## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
@@ -17,27 +16,28 @@
## and conditions see https://www.qt.io/terms-conditions. For further
## information use the contact form at https://www.qt.io/contact-us.
##
-## $QT_END_LICENSE$
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
-##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
##
+## $QT_END_LICENSE$
##
-############################################################################
+#############################################################################
from __future__ import print_function
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index e1156d0e76..4416240cf2 100644
--- a/mkspecs/features/uikit/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -58,7 +58,7 @@ debug-%: CONFIGURATION = Debug
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
-# Test and build (device) destinations
+# Test device destinations
ifneq ($(filter check%,$(MAKECMDGOALS)),)
ifeq ($(DEVICES),)
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
@@ -72,10 +72,10 @@ endif
%-device: DEVICES = $(HARDWARE_DEVICES)
GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
-GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(MAKEFILE_DIR)devices.py $(EXPORT_DEVICE_FILTER) | tail -n 1)"
+GENERIC_SIMULATOR_DESTINATION := $(EXPORT_GENERIC_SIMULATOR_DESTINATION)
-%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION))
-%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION))
+%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_SIMULATOR_DESTINATION)")
+%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_DEVICE_DESTINATION)")
XCODE_VERSION_MAJOR := $(shell xcodebuild -version | grep Xcode | sed -e 's/Xcode //' | sed -e 's/\..*//')
@@ -83,6 +83,10 @@ ifeq ($(shell test $(XCODE_VERSION_MAJOR) -gt 7; echo $$?),0)
XCODEBUILD_FLAGS += $(shell echo "$(MAKEFLAGS)" | sed -e 's/\([^ ]*\).*/\1/' | grep -qv 's' || echo -quiet)
endif
+ifeq ($(shell test $(XCODE_VERSION_MAJOR) -ge 9; echo $$?),0)
+ XCODEBUILD_FLAGS += -allowProvisioningUpdates
+endif
+
# Xcodebuild
DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf
index 01022c7b99..ddf606cda4 100644
--- a/mkspecs/features/uikit/xcodebuild.prf
+++ b/mkspecs/features/uikit/xcodebuild.prf
@@ -53,7 +53,13 @@ watchos {
DEVICE_FILTER = --platform watchOS --minimum-deployment-target $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
GENERIC_DEVICE_DESTINATION = "generic/platform=watchOS"
}
-QMAKE_EXTRA_VARIABLES += DEVICE_SDK SIMULATOR_SDK DEVICE_FILTER GENERIC_DEVICE_DESTINATION
+GENERIC_SIMULATOR_DESTINATION = "$$GENERIC_DEVICE_DESTINATION Simulator"
+
+QMAKE_EXTRA_VARIABLES += \
+ DEVICE_SDK SIMULATOR_SDK \
+ DEVICE_FILTER \
+ GENERIC_DEVICE_DESTINATION \
+ GENERIC_SIMULATOR_DESTINATION
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/xcodebuild.mk)
diff --git a/mkspecs/features/win32/separate_debug_info.prf b/mkspecs/features/win32/separate_debug_info.prf
index 2838020f01..8550fdda15 100644
--- a/mkspecs/features/win32/separate_debug_info.prf
+++ b/mkspecs/features/win32/separate_debug_info.prf
@@ -13,6 +13,10 @@ have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info $$QMAKE_POST_LINK
silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
- target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ contains(TEMPLATE, lib$):!plugin {
+ dlltarget.targets += $$QMAKE_TARGET_DEBUG_INFO
+ } else {
+ target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ }
QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
}
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index 279971bd65..2abe75f726 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -37,8 +37,7 @@
else: \
VCLIBS = $${VCLIBS}
# VS 2017 and 2019 still use vclibs 140
- contains(MSVC_VER, "15.0"): VCLIBS = $$replace(VCLIBS, 150, 140)
- contains(MSVC_VER, "16.0"): VCLIBS = $$replace(VCLIBS, 160, 140)
+ contains(MSVC_VER, "1[56]\.[0-9]"): VCLIBS = $$replace(VCLIBS, 1[56][0-9], 140)
VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
WINRT_MANIFEST.dependencies += $$VCLIBS
}