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
115
115
$<$<PLATFORM_ID:Windows>:Synchronization>
116
116
$<$<PLATFORM_ID:Windows>:mincore>
117
117
# 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)
122
119
set_target_properties (swift_Concurrency PROPERTIES
123
120
Swift_MODULE_NAME _Concurrency)
124
121
Original file line number Diff line number Diff line change @@ -313,8 +313,16 @@ target_link_libraries(swiftCore
313
313
$<$<NOT :$<PLATFORM_ID:Darwin>>:swiftrt$<$<PLATFORM_ID:Windows>:T>>
314
314
PUBLIC
315
315
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 ()
318
326
if (NOT POLICY CMP0157)
319
327
target_compile_options (swiftCore PRIVATE
320
328
$<TARGET_OBJECTS:swiftRuntime>
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ elseif("${SwiftCore_OBJECT_FORMAT}" STREQUAL "coffx")
173
173
SWIFT_STATIC_STDLIB)
174
174
target_link_libraries (swiftrtT PRIVATE swiftShims)
175
175
install (FILES $<TARGET_OBJECTS:swiftrtT>
176
+ COMPONENT SwiftCore_runtime
176
177
DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
177
178
RENAME swiftrtT.obj)
178
179
You can’t perform that action at this time.
0 commit comments