Skip to content

Commit f199723

Browse files
committed
SourceKit: hoist decision for building InProc
The decision to whether build InProc or as an XPC service is needed for the test tools as well. Rather than recompute it for the tests as well, hoist it to the top level for the SourceKit project. This repairs the build of the SourceKit tests on non-Darwin hosts.
1 parent e7dd7b2 commit f199723

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tools/SourceKit/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT CMAKE_CROSSCOMPILING)
3434
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
3535
endif()
3636

37+
# If we were don't have XPC, just build inproc.
38+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT HAVE_XPC_H)
39+
set(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY TRUE)
40+
endif()
41+
3742
# Now include AddSwiftSourceKit
3843
include(AddSwiftSourceKit)
3944

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# If we were going to build for APPLE but don't have XPC, just build inproc.
2-
if(APPLE AND NOT HAVE_XPC_H)
3-
set(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY TRUE)
4-
endif()
51

62
set(sourcekitdAPI_sources
73
CodeCompletionResultsArray.cpp

0 commit comments

Comments
 (0)