File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1515# Build the vendored version of the BlocksRuntime library, which is used by
1616# platforms that don't support libdispatch.
1717
18- add_library (BlocksRuntime
18+ # Build the BlocksRuntime as an object library, shipped as a part
19+ # of libCoreFoundation.
20+ add_library (BlocksRuntime OBJECT
1921 data.c
2022 runtime.c)
2123
@@ -27,11 +29,4 @@ target_include_directories(BlocksRuntime PUBLIC
2729set_target_properties (BlocksRuntime PROPERTIES
2830 POSITION_INDEPENDENT_CODE FALSE )
2931
30- add_library (BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime)
31-
32- if (NOT BUILD_SHARED_LIBS )
33- set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS BlocksRuntime)
34- install (TARGETS BlocksRuntime
35- ARCHIVE DESTINATION lib/swift$<$<NOT :$<BOOL :${BUILD_SHARED_LIBS} >>:_static>/${SWIFT_SYSTEM_NAME}
36- LIBRARY DESTINATION lib/swift$<$<NOT :$<BOOL :${BUILD_SHARED_LIBS} >>:_static>/${SWIFT_SYSTEM_NAME} )
37- endif ()
32+ set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS BlocksRuntime)
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ target_link_libraries(CoreFoundation
121121if (CMAKE_SYSTEM_NAME STREQUAL WASI)
122122 # On WASI, we use vendored BlocksRuntime instead of the one from libdispatch
123123 add_subdirectory (BlockRuntime)
124+ # Add BlocksRuntime object library to CoreFoundation static archive
124125 target_link_libraries (CoreFoundation PRIVATE BlocksRuntime)
125126endif ()
126127
You can’t perform that action at this time.
0 commit comments