diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-11 09:29:17 +0200 |
commit | 4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch) | |
tree | cc68622c9b85992d99a8373ab55471ee821a4ebf /mkspecs/features/toolchain.prf | |
parent | ab28ff2207e8f33754c79793089dbf943d67736d (diff) | |
parent | ebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: I569a2246c9e8d70430e8c5405b9f3df2218078ee
Diffstat (limited to 'mkspecs/features/toolchain.prf')
-rw-r--r-- | mkspecs/features/toolchain.prf | 11 |
1 files changed, 8 insertions, 3 deletions
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 |