Skip to content

Commit 8531c5d

Browse files
albluejrose-apple
authored andcommitted
Fix build errors for SourceKit on Linux (#5862)
The sourcekitd-repl, sourcekitd-test and complete-test use symbols from both the coverage and lto modules, specifically `llvm::coverage::CoverageFilenamesSectionWriter::write` and `llvm::lto::thinBackend`. Adding these to the list of dependencies allows SourceKit to be built on Linux. Issue: SR-3223
1 parent 6bea6b5 commit 8531c5d

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

tools/SourceKit/lib/SwiftLang/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ add_sourcekit_library(SourceKitSwiftLang
3838
debuginfodwarf
3939
instrumentation
4040
ipo
41+
lto
4142
mc
4243
mcparser
4344
option

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111
add_sourcekit_executable(complete-test
1212
complete-test.cpp
1313
DEPENDS ${SOURCEKITD_TEST_DEPEND}
14-
LLVM_COMPONENT_DEPENDS support option
14+
LLVM_COMPONENT_DEPENDS support option coverage lto
1515
)
1616

1717
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(HAVE_UNICODE_LIBEDIT)
1515
add_sourcekit_executable(sourcekitd-repl
1616
sourcekitd-repl.cpp
1717
DEPENDS ${SOURCEKITD_REPL_DEPEND} edit
18-
LLVM_COMPONENT_DEPENDS support
18+
LLVM_COMPONENT_DEPENDS support coverage lto
1919
)
2020

2121
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ add_sourcekit_executable(sourcekitd-test
1717
TestOptions.cpp
1818
DEPENDS ${SOURCEKITD_TEST_DEPEND} SourceKitSupport
1919
clangRewrite clangLex clangBasic
20-
LLVM_COMPONENT_DEPENDS core support option
20+
LLVM_COMPONENT_DEPENDS core support option coverage lto
2121
)
2222

2323
add_dependencies(sourcekitd-test sourcekitdTestOptionsTableGen)

0 commit comments

Comments
 (0)