summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.json13
-rw-r--r--configure.pri7
-rw-r--r--mkspecs/common/macx.conf1
-rw-r--r--mkspecs/features/mac/default_post.prf8
-rw-r--r--mkspecs/features/toolchain.prf11
5 files changed, 30 insertions, 10 deletions
diff --git a/configure.json b/configure.json
index 29afbac43d..a9249e1ed2 100644
--- a/configure.json
+++ b/configure.json
@@ -241,11 +241,18 @@
"testTypeDependencies": {
"linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ],
- "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ],
+ "verifySpec": [
+ "shared",
+ "use_bfd_linker", "use_gold_linker", "use_lld_linker",
+ "compiler-flags", "qmakeargs",
+ "simulator_and_device",
+ "thread",
+ "commit" ],
"compile": [ "verifyspec" ],
"detectPkgConfig": [ "cross_compile", "machineTuple" ],
"library": [ "pkg-config", "compiler-flags" ],
- "getPkgConfigVariable": [ "pkg-config" ]
+ "getPkgConfigVariable": [ "pkg-config" ],
+ "architecture" : [ "verifyspec" ]
},
"testTypeAliases": {
@@ -749,7 +756,7 @@
},
"architecture": {
"label": "Architecture",
- "output": [ "architecture" ]
+ "output": [ "architecture", "commitConfig" ]
},
"pkg-config": {
"label": "Using pkg-config",
diff --git a/configure.pri b/configure.pri
index a04aa17236..f55b7cb448 100644
--- a/configure.pri
+++ b/configure.pri
@@ -660,6 +660,13 @@ defineTest(qtConfOutput_commitOptions) {
write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error()
}
+# Output is written after configuring each Qt module,
+# but some tests within a module might depend on the
+# configuration output of previous tests.
+defineTest(qtConfOutput_commitConfig) {
+ qtConfProcessOutput()
+}
+
# type (empty or 'host'), option name, default value
defineTest(processQtPath) {
out_var = config.rel_input.$${2}
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index 6a1b076d7d..4ee3971525 100644
--- a/mkspecs/common/macx.conf
+++ b/mkspecs/common/macx.conf
@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx
QMAKE_MAC_SDK = macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
-QMAKE_APPLE_DEVICE_ARCHS = x86_64
# Should be 10.15, but as long as the CI builds with
# older SDKs we have to keep this.
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 92a9112bca..d888731ec8 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -90,6 +90,11 @@ app_extension_api_only {
QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
}
+# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS,
+# so we pick it up from what the arch test resolved instead.
+isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \
+ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH
+
macx-xcode {
qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
!isEmpty(QMAKE_PKGINFO_TYPEINFO): \
@@ -145,9 +150,6 @@ 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))
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 2a1f7cba3d..0040b6c4b9 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