summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/mac/default_pre.prf
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
commit4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch)
treecc68622c9b85992d99a8373ab55471ee821a4ebf /mkspecs/features/mac/default_pre.prf
parentab28ff2207e8f33754c79793089dbf943d67736d (diff)
parentebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Diffstat (limited to 'mkspecs/features/mac/default_pre.prf')
-rw-r--r--mkspecs/features/mac/default_pre.prf21
1 files changed, 21 insertions, 0 deletions
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) {