File tree Expand file tree Collapse file tree 8 files changed +38
-7
lines changed Expand file tree Collapse file tree 8 files changed +38
-7
lines changed Original file line number Diff line number Diff line change @@ -506,5 +506,19 @@ include_directories(BEFORE
506
506
${SOURCEKIT_SOURCE_DIR} /include
507
507
)
508
508
509
+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Linux" )
510
+ include_directories (AFTER ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} )
511
+
512
+ add_library (dispatch SHARED IMPORTED )
513
+ set_target_properties (dispatch PROPERTIES
514
+ IMPORTED_LOCATION ${SWIFT_PATH_TO_LIBDISPATCH_BUILD} /src/.libs/libdispatch.so )
515
+
516
+ add_library (swiftCore SHARED IMPORTED )
517
+ set_target_properties (swiftCore PROPERTIES
518
+ IMPORTED_LOCATION ${SOURCEKIT_BINARY_DIR} /lib/swift/linux/libswiftCore.so )
519
+
520
+ set (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH TRUE )
521
+ endif ()
522
+
509
523
add_subdirectory (lib )
510
524
add_subdirectory (tools )
Original file line number Diff line number Diff line change 1
1
set (SourceKitSupport_sources
2
+ Concurrency-libdispatch.cpp
2
3
FuzzyStringMatcher.cpp
3
4
Logging.cpp
4
5
ImmutableTextBuffer.cpp
@@ -7,14 +8,12 @@ set(SourceKitSupport_sources
7
8
UIDRegistry.cpp
8
9
)
9
10
10
- set (SourceKitSupport_Darwin_sources
11
- Concurrency-Mac.cpp )
12
- set (LLVM_OPTIONAL_SOURCES ${SourceKitSupport_Darwin_sources} )
13
- if (APPLE )
14
- list (APPEND SourceKitSupport_sources ${SourceKitSupport_Darwin_sources} )
11
+ set (SOURCEKIT_SUPPORT_DEPEND swiftBasic clangBasic clangRewrite )
12
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
13
+ list (APPEND SOURCEKIT_SUPPORT_DEPEND dispatch BlocksRuntime )
15
14
endif ()
16
15
17
16
add_sourcekit_library (SourceKitSupport
18
17
${SourceKitSupport_sources}
19
- DEPENDS swiftBasic clangBasic clangRewrite
18
+ DEPENDS ${SOURCEKIT_SUPPORT_DEPEND}
20
19
)
Original file line number Diff line number Diff line change 1
- // ===--- Concurrency-Mac .cpp -------- --------------------------------------===//
1
+ // ===--- Concurrency-libdispatch .cpp --------------------------------------===//
2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
Original file line number Diff line number Diff line change 4
4
set (SOURCEKITD_TEST_DEPEND sourcekitd )
5
5
endif ()
6
6
7
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
8
+ set (SOURCEKITD_TEST_DEPEND ${SOURCEKITD_TEST_DEPEND} dispatch swiftCore )
9
+ endif ()
10
+
7
11
add_sourcekit_executable (complete-test
8
12
complete-test.cpp
9
13
DEPENDS ${SOURCEKITD_TEST_DEPEND}
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ if(HAVE_UNICODE_LIBEDIT)
8
8
set (SOURCEKITD_REPL_DEPEND sourcekitd )
9
9
endif ()
10
10
11
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
12
+ set (SOURCEKITD_REPL_DEPEND ${SOURCEKITD_REPL_DEPEND} dispatch swiftCore )
13
+ endif ()
14
+
11
15
add_sourcekit_executable (sourcekitd-repl
12
16
sourcekitd-repl.cpp
13
17
DEPENDS ${SOURCEKITD_REPL_DEPEND} edit
Original file line number Diff line number Diff line change 8
8
set (SOURCEKITD_TEST_DEPEND sourcekitd )
9
9
endif ()
10
10
11
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
12
+ set (SOURCEKITD_TEST_DEPEND ${SOURCEKITD_TEST_DEPEND} dispatch swiftCore )
13
+ endif ()
14
+
11
15
add_sourcekit_executable (sourcekitd-test
12
16
sourcekitd-test.cpp
13
17
TestOptions.cpp
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ else()
23
23
)
24
24
endif ()
25
25
26
+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Linux" )
27
+ target_link_libraries (sourcekitdInProc PUBLIC BlocksRuntime )
28
+ endif ()
29
+
26
30
if (SOURCEKIT_BUILT_STANDALONE )
27
31
# Create the symlinks necessary to find the swift runtime.
28
32
add_custom_command (TARGET sourcekitdInProc PRE_BUILD
Original file line number Diff line number Diff line change @@ -1979,6 +1979,8 @@ for host in "${ALL_HOSTS[@]}"; do
1979
1979
-DSWIFT_PATH_TO_LLVM_BUILD:PATH=" ${llvm_build_dir} "
1980
1980
-DSWIFT_PATH_TO_CMARK_SOURCE:PATH=" ${CMARK_SOURCE_DIR} "
1981
1981
-DSWIFT_PATH_TO_CMARK_BUILD:PATH=" $( build_directory ${host} cmark) "
1982
+ -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE:PATH=" ${LIBDISPATCH_SOURCE_DIR} "
1983
+ -DSWIFT_PATH_TO_LIBDISPATCH_BUILD:PATH=" $( build_directory ${host} libdispatch) "
1982
1984
)
1983
1985
1984
1986
if [[ " ${CMAKE_GENERATOR} " == " Xcode" ]] ; then
You can’t perform that action at this time.
0 commit comments