Skip to content

Commit 88043e4

Browse files
[release/7.0.1xx-xcode14-rc2] Disable objc_msgSend stubs in clang. Fixes #16223. (#16232)
Clang will by default emit objc_msgSend stubs in Xcode 14, which ld from earlier Xcodes doesn't understand. We disable this by passing -fno-objc-msgsend-selector-stubs to clang. Ref: https://developer.apple.com/videos/play/wwdc2022/110363/ Ref: https://www.wwdcnotes.com/notes/wwdc22/110363/ Ref: llvm/llvm-project#56034 Fixes #16223. Backport of #16231 Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
1 parent a51b91d commit 88043e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Make.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ endif
370370

371371
SIMULATOR_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(IOS_SDK_VERSION).sdk
372372

373-
OBJC_CFLAGS=-ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++
373+
# Clang will by default emit objc_msgSend stubs in Xcode 14, which ld from earlier Xcodes doesn't understand.
374+
# We disable this by passing -fno-objc-msgsend-selector-stubs to clang.
375+
# We can probably remove this flag once we require developers to use Xcode 14.
376+
# Ref: https://github.com/xamarin/xamarin-macios/issues/16223
377+
OBJC_CFLAGS=-ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++ -fno-objc-msgsend-selector-stubs
374378

375379
COMMON_SIMULATOR_CFLAGS=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(SIMULATOR_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
376380
SIMULATOR86_CFLAGS=$(COMMON_SIMULATOR_CFLAGS) -arch i386

0 commit comments

Comments
 (0)