Skip to content

Commit b100f09

Browse files
committed
Fix: restrict -ld_classic linker flag to Xcode 15.0.x only
-ld_classic was added as a workaround for weak symbol crash (114813650) introduced by Xcode 15.0's new linker. This issue was resolved in Xcode 15.1, and -ld_classic is deprecated in Xcode 16 and removed in Xcode 26. Restricting the flag avoids build errors on newer Xcode versions and allows use of the faster new linker.
1 parent a625a42 commit b100f09

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

native/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3744,9 +3744,9 @@ if(APPLE)
37443744
)
37453745
elseif(IOS)
37463746

3747-
if("${XCODE_VERSION}" VERSION_GREATER_EQUAL "15.0")
3748-
# For Xcode 15 and newer, add extra link flags to fix crash in __cxx_global_var_init.
3749-
message(STATUS "Using Xcode 15 or newer, adding extra link flags: -Wl,-ld_classic.")
3747+
if("${XCODE_VERSION}" VERSION_GREATER_EQUAL "15.0" AND "${XCODE_VERSION}" VERSION_LESS "15.1")
3748+
# Xcode 15.0 new linker crashes on weak symbols (114813650), fixed in 15.1.
3749+
message(STATUS "Xcode ${XCODE_VERSION}: adding -Wl,-ld_classic to work around weak symbol crash.")
37503750
target_link_options(${ENGINE_NAME} PUBLIC -Wl,-ld_classic)
37513751
endif()
37523752

0 commit comments

Comments
 (0)