Skip to content

SourceKit: explicitly link against BlocksRuntime as well #19668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tools/SourceKit/lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ set(SourceKitSupport_sources
UIDRegistry.cpp
)

set(SOURCEKIT_SUPPORT_DEPEND swiftBasic swiftSyntax clangBasic clangRewrite)
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
list(APPEND SOURCEKIT_SUPPORT_DEPEND dispatch BlocksRuntime)
endif()

add_sourcekit_library(SourceKitSupport
${SourceKitSupport_sources}
LINK_LIBS ${SOURCEKIT_SUPPORT_DEPEND}
LINK_LIBS swiftBasic swiftSyntax clangBasic clangRewrite
)
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
target_link_libraries(SourceKitSupport INTERFACE dispatch BlocksRuntime)
endif()

7 changes: 3 additions & 4 deletions tools/SourceKit/tools/complete-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ else()
set(SOURCEKITD_TEST_LINK_LIBS sourcekitd)
endif()

if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
set(SOURCEKITD_TEST_LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} dispatch)
endif()

add_sourcekit_executable(complete-test
complete-test.cpp
LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS}
LLVM_COMPONENT_DEPENDS support option coverage lto
)
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
target_link_libraries(complete-test PRIVATE dispatch BlocksRuntime)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set_target_properties(complete-test
Expand Down
7 changes: 3 additions & 4 deletions tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ if(HAVE_UNICODE_LIBEDIT)
set(SOURCEKITD_REPL_LINK_LIBS sourcekitd)
endif()

if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
set(SOURCEKITD_REPL_LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS} dispatch)
endif()

add_sourcekit_executable(sourcekitd-repl
sourcekitd-repl.cpp
LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS} edit
LLVM_COMPONENT_DEPENDS support coverage lto
)
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
target_link_libraries(sourcekitd-repl PRIVATE dispatch BlocksRuntime)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set_target_properties(sourcekitd-repl
Expand Down
7 changes: 3 additions & 4 deletions tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ else()
set(SOURCEKITD_TEST_LINK_LIBS sourcekitd)
endif()

if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
set(SOURCEKITD_TEST_LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} dispatch)
endif()

add_sourcekit_executable(sourcekitd-test
sourcekitd-test.cpp
TestOptions.cpp
LINK_LIBS ${SOURCEKITD_TEST_LINK_LIBS} SourceKitSupport
clangRewrite clangLex clangBasic
LLVM_COMPONENT_DEPENDS core support option coverage lto
)
if(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH)
target_link_libraries(sourcekitd-test PRIVATE dispatch BlocksRuntime)
endif()

add_dependencies(sourcekitd-test sourcekitdTestOptionsTableGen)

Expand Down