Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ if (CLR_CMAKE_HOST_UNIX)
endif()
endif()

# Force usage of classic linker on Xcode 15
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15 AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
add_link_options("-Wl,-ld_classic")
endif()

if (CMAKE_CONFIGURATION_TYPES) # multi-configuration generator?
set(CMAKE_CONFIGURATION_TYPES "Debug;Checked;Release;RelWithDebInfo" CACHE STRING "" FORCE)
endif (CMAKE_CONFIGURATION_TYPES)
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/pal/inc/unixasmmacrosamd64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ C_FUNC(\Name):
.endm

.macro LEAF_END_MARKED Name, Section
C_FUNC(\Name\()_End):
#if defined(__APPLE__)
.alt_entry C_FUNC(\Name\()_End)
.private_extern C_FUNC(\Name\()_End)
#else
.global C_FUNC(\Name\()_End)
#endif
C_FUNC(\Name\()_End):
LEAF_END \Name, \Section
// make sure this symbol gets its own address
nop
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/pal/inc/unixasmmacrosarm64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ C_FUNC(\Name):
.endm

.macro LEAF_END_MARKED Name, Section
C_FUNC(\Name\()_End):
#if defined(__APPLE__)
.alt_entry C_FUNC(\Name\()_End)
.private_extern C_FUNC(\Name\()_End)
#else
.global C_FUNC(\Name\()_End)
#endif
C_FUNC(\Name\()_End):
LEAF_END \Name, \Section
// make sure this symbol gets its own address
nop
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/amd64/CachedInterfaceDispatchCoreCLR.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LEAF_ENTRY RhpVTableOffsetDispatch, _TEXT
// to get the address in the vtable chunk list of what we want to dereference
#ifdef TARGET_APPLE
// Apple's linker has issues which break unwind info if
// an ALTERNATE_ENTRY is present in the middle of a function see https://github.com/dotnet/runtime/pull/114982#discussion_r2083272768
// an ALTERNATE_ENTRY is present in the middle of a function see https://github.com/dotnet/runtime/issues/119005
.cfi_endproc
#endif
ALTERNATE_ENTRY RhpVTableOffsetDispatchAVLocation
Expand Down
Loading
Loading