File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,7 @@ target_link_libraries(swift_Concurrency PRIVATE
115115 $<$<PLATFORM_ID:Windows>:Synchronization>
116116 $<$<PLATFORM_ID:Windows>:mincore>
117117 # Link to the runtime that we are just building.
118- swiftCore
119- $<$<NOT :$<PLATFORM_ID:Darwin>>:swiftrt>)
120- target_link_options (swift_Concurrency PRIVATE
121- -nostartfiles)
118+ swiftCore)
122119set_target_properties (swift_Concurrency PROPERTIES
123120 Swift_MODULE_NAME _Concurrency)
124121
Original file line number Diff line number Diff line change @@ -313,8 +313,16 @@ target_link_libraries(swiftCore
313313 $<$<NOT :$<PLATFORM_ID:Darwin>>:swiftrt$<$<PLATFORM_ID:Windows>:T>>
314314 PUBLIC
315315 swiftShims)
316- target_link_options (swiftCore PRIVATE
317- -nostartfiles)
316+ target_link_options (swiftCore PUBLIC
317+ $<$<LINK_LANGUAGE:Swift>:-nostartfiles>)
318+ string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc)
319+ if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
320+ target_link_libraries (swiftCore INTERFACE
321+ swiftrt$<$<BOOL :NO >:>)
322+ elseif ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "coff" )
323+ target_link_libraries (swiftCore INTERFACE
324+ swiftrt$<$<NOT :$<BOOL :${BUILD_SHARED_LIBS} >>:T>)
325+ endif ()
318326if (NOT POLICY CMP0157)
319327 target_compile_options (swiftCore PRIVATE
320328 $<TARGET_OBJECTS:swiftRuntime>
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ elseif("${SwiftCore_OBJECT_FORMAT}" STREQUAL "coffx")
173173 SWIFT_STATIC_STDLIB)
174174 target_link_libraries (swiftrtT PRIVATE swiftShims)
175175 install (FILES $<TARGET_OBJECTS:swiftrtT>
176+ COMPONENT SwiftCore_runtime
176177 DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
177178 RENAME swiftrtT.obj)
178179
You can’t perform that action at this time.
0 commit comments