Skip to content

Commit 4b83c16

Browse files
author
Harlan
authored
Make SourceKitSwiftLang depend on swift-syntax-generated-headers (#11226)
1 parent 05a9db1 commit 4b83c16

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/SourceKit/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ endfunction()
115115
#
116116
# Usage:
117117
# add_sourcekit_library(name # Name of the library
118-
# [DEPENDS dep1 ...] # Libraries this library depends on
118+
# [DEPENDS dep1 ...] # Libraries this library will be linked with
119+
# [TARGET_DEPENDS dep1 ...] # Targets this library depends on
119120
# [LLVM_COMPONENT_DEPENDS comp1 ...] # LLVM components this library depends on
120121
# [INSTALL_IN_COMPONENT comp] # The Swift installation component that this library belongs to.
121122
# [SHARED]
@@ -124,7 +125,7 @@ macro(add_sourcekit_library name)
124125
cmake_parse_arguments(SOURCEKITLIB
125126
"SHARED"
126127
"INSTALL_IN_COMPONENT"
127-
"DEPENDS;LLVM_COMPONENT_DEPENDS"
128+
"DEPENDS;TARGET_DEPENDS;LLVM_COMPONENT_DEPENDS"
128129
${ARGN})
129130
set(srcs ${SOURCEKITLIB_UNPARSED_ARGUMENTS})
130131

@@ -169,6 +170,10 @@ macro(add_sourcekit_library name)
169170
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
170171
endif(LLVM_COMMON_DEPENDS)
171172

173+
if(SOURCEKITLIB_TARGET_DEPENDS)
174+
add_dependencies(${name} ${SOURCEKITLIB_TARGET_DEPENDS})
175+
endif(SOURCEKITLIB_TARGET_DEPENDS)
176+
172177
set(prefixed_link_libraries)
173178
foreach(dep ${SOURCEKITLIB_DEPENDS})
174179
if("${dep}" MATCHES "^clang")

tools/SourceKit/lib/SwiftLang/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ add_sourcekit_library(SourceKitSwiftLang
88
SwiftIndexing.cpp
99
SwiftLangSupport.cpp
1010
SwiftSourceDocInfo.cpp
11+
TARGET_DEPENDS swift-syntax-generated-headers
1112
DEPENDS SourceKitCore swiftDriver swiftFrontend swiftClangImporter swiftIDE
1213
swiftAST swiftMarkup swiftParse swiftParseSIL swiftSIL swiftSILGen
1314
swiftSILOptimizer swiftIRGen swiftSema swiftBasic swiftSerialization

0 commit comments

Comments
 (0)