Skip to content

Commit f6e2781

Browse files
committed
build, qt, macOS: Don't pass -device-option when building natively
1 parent 667f068 commit f6e2781

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

depends/packages/qt.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
128128
$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
129129
endif
130130

131-
# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279
131+
ifneq ($(build_arch),$(host_arch))
132132
$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64
133+
$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64
134+
endif
133135

134136
$(package)_config_opts_linux = -qt-xcb
135137
$(package)_config_opts_linux += -no-xcb-xlib

depends/patches/qt/mac-qmake.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
1313
QMAKE_MAC_SDK.macosx.platform_name = macosx
1414
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
1515
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
16-
QMAKE_APPLE_DEVICE_ARCHS=x86_64
1716
!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
1817
!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
1918
!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS

0 commit comments

Comments
 (0)