File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 15
15
# Build the vendored version of the BlocksRuntime library, which is used by
16
16
# platforms that don't support libdispatch.
17
17
18
- add_library (BlocksRuntime
18
+ # Build the BlocksRuntime as an object library, shipped as a part
19
+ # of libCoreFoundation.
20
+ add_library (BlocksRuntime OBJECT
19
21
data.c
20
22
runtime.c)
21
23
@@ -27,11 +29,4 @@ target_include_directories(BlocksRuntime PUBLIC
27
29
set_target_properties (BlocksRuntime PROPERTIES
28
30
POSITION_INDEPENDENT_CODE FALSE )
29
31
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
121
121
if (CMAKE_SYSTEM_NAME STREQUAL WASI)
122
122
# On WASI, we use vendored BlocksRuntime instead of the one from libdispatch
123
123
add_subdirectory (BlockRuntime)
124
+ # Add BlocksRuntime object library to CoreFoundation static archive
124
125
target_link_libraries (CoreFoundation PRIVATE BlocksRuntime)
125
126
endif ()
126
127
You can’t perform that action at this time.
0 commit comments