summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/toolchain.prf4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 03612e5689..5003679bd0 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -182,6 +182,10 @@ 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:macx-xcode: \
cxx_flags += -isysroot $$sdk_path_device.value
else: \