Commit c919fc5f authored by Tor Arne Vestbø's avatar Tor Arne Vestbø

Pass -arch when running toolchain configure test on Apple platforms

Clang doesn't automatically switch architecture just because we're
passing an iPhoneOS sysroot. In the past this resulted in a warning
about trying to link an x86_64 binary to arm64 libraries, but with
Xcode 12 this is now a hard error.

Fixes: QTBUG-86718
Change-Id: I7e9d2ca513d276029fc2a6cfe694a35fe41c39b3
Reviewed-by: default avatarTor Arne Vestbø <>
(cherry picked from commit ac43986a)
Reviewed-by: default avatarQt Cherry-pick Bot <>
(cherry picked from commit 168438dc)
Reviewed-by: default avatarJani Heikkinen <>
parent d43c6f1b
......@@ -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: \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment