Skip to content

Commit 2c4eb84

Browse files
committed
[SourceKit] Add an in-proc implementation of sourcekitd API functions.
Darwin can use the XPC implementation of this even for the in-proc library build, this alternative implementation is need for Linux where XPC services are not available. This implementation is derived from the existing XPC one but replaces XPC services' object model with a basic class hierarchy providing reference-counted objects for the value types and collections that compose the sourcekitd API's request and response types.
1 parent 104a72f commit 2c4eb84

File tree

2 files changed

+940
-1
lines changed

2 files changed

+940
-1
lines changed

tools/SourceKit/tools/sourcekitd/lib/API/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ set(sourcekitdAPI_sources
99

1010
set(sourcekitdAPI_Darwin_sources
1111
sourcekitdAPI-XPC.cpp)
12-
set(LLVM_OPTIONAL_SOURCES ${sourcekitdAPI_Darwin_sources})
12+
set(sourcekitdAPI_NonDarwin_InProc_sources
13+
sourcekitdAPI-InProc.cpp)
14+
set(LLVM_OPTIONAL_SOURCES ${sourcekitdAPI_Darwin_sources} ${sourcekitdAPI_NonDarwin_InProc_sources})
15+
1316
if(APPLE)
1417
list(APPEND sourcekitdAPI_sources ${sourcekitdAPI_Darwin_sources})
18+
elseif(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
19+
list(APPEND sourcekitdAPI_sources ${sourcekitdAPI_NonDarwin_InProc_sources})
1520
endif()
1621

1722
add_sourcekit_library(sourcekitdAPI

0 commit comments

Comments
 (0)