Skip to content

Commit 01fdb28

Browse files
committed
[CMake] Make sure to link swiftrt.o when building the Swift Dispatch overlay.
Because we are linking libdispatch through clang rather than swift, we need to explicitly add swiftrt.o, which is needed by ELF and COFF to register metadata sections. Fixes rdar://problem/44941707.
1 parent c55ff6f commit 01fdb28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ if(ENABLE_SWIFT)
115115
target_sources(dispatch
116116
PRIVATE
117117
swift/DispatchStubs.cc
118-
${CMAKE_CURRENT_BINARY_DIR}/swiftDispatch.o)
118+
${CMAKE_CURRENT_BINARY_DIR}/swiftDispatch.o
119+
${SWIFT_RUNTIME_LIBDIR}/swiftrt.o)
119120
if(CMAKE_BUILD_TYPE MATCHES Debug)
120121
target_link_libraries(dispatch
121122
PRIVATE

0 commit comments

Comments
 (0)