Skip to content

Commit 7c9b6f0

Browse files
authored
Merge pull request #19668 from compnerd/explicit-BlocksRuntime
SourceKit: explicitly link against BlocksRuntime as well
2 parents 7c9376d + e7bc37b commit 7c9b6f0

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

tools/SourceKit/lib/Support/CMakeLists.txt

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ set(SourceKitSupport_sources
88
UIDRegistry.cpp
99
)
1010

11-
set(SOURCEKIT_SUPPORT_DEPEND swiftBasic swiftSyntax clangBasic clangRewrite)
12-
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
13-
list(APPEND SOURCEKIT_SUPPORT_DEPEND dispatch BlocksRuntime)
14-
endif()
15-
1611
add_sourcekit_library(SourceKitSupport
1712
${SourceKitSupport_sources}
18-
LINK_LIBS ${SOURCEKIT_SUPPORT_DEPEND}
13+
LINK_LIBS swiftBasic swiftSyntax clangBasic clangRewrite
1914
)
15+
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
16+
target_link_libraries(SourceKitSupport INTERFACE dispatch BlocksRuntime)
17+
endif()
18+

tools/SourceKit/tools/complete-test/CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ else()
44
set(SOURCEKITD_TEST_LINK_LIBS sourcekitd)
55
endif()
66

7-
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
8-
set(SOURCEKITD_TEST_LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} dispatch)
9-
endif()
10-
117
add_sourcekit_executable(complete-test
128
complete-test.cpp
139
LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS}
1410
LLVM_COMPONENT_DEPENDS support option coverage lto
1511
)
12+
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
13+
target_link_libraries(complete-test PRIVATE dispatch BlocksRuntime)
14+
endif()
1615

1716
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
1817
set_target_properties(complete-test

tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ if(HAVE_UNICODE_LIBEDIT)
88
set(SOURCEKITD_REPL_LINK_LIBS sourcekitd)
99
endif()
1010

11-
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
12-
set(SOURCEKITD_REPL_LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS} dispatch)
13-
endif()
14-
1511
add_sourcekit_executable(sourcekitd-repl
1612
sourcekitd-repl.cpp
1713
LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS} edit
1814
LLVM_COMPONENT_DEPENDS support coverage lto
1915
)
16+
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
17+
target_link_libraries(sourcekitd-repl PRIVATE dispatch BlocksRuntime)
18+
endif()
2019

2120
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
2221
set_target_properties(sourcekitd-repl

tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ else()
88
set(SOURCEKITD_TEST_LINK_LIBS sourcekitd)
99
endif()
1010

11-
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
12-
set(SOURCEKITD_TEST_LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} dispatch)
13-
endif()
14-
1511
add_sourcekit_executable(sourcekitd-test
1612
sourcekitd-test.cpp
1713
TestOptions.cpp
1814
LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} SourceKitSupport
1915
clangRewrite clangLex clangBasic
2016
LLVM_COMPONENT_DEPENDS core support option coverage lto
2117
)
18+
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
19+
target_link_libraries(sourcekitd-test PRIVATE dispatch BlocksRuntime)
20+
endif()
2221

2322
add_dependencies(sourcekitd-test sourcekitdTestOptionsTableGen)
2423

0 commit comments

Comments
 (0)