File tree Expand file tree Collapse file tree 6 files changed +35
-1
lines changed Expand file tree Collapse file tree 6 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -507,5 +507,15 @@ include_directories(BEFORE
507
507
${SOURCEKIT_SOURCE_DIR} /include
508
508
)
509
509
510
+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Linux" )
511
+ include_directories (AFTER ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} )
512
+
513
+ add_library (dispatch SHARED IMPORTED )
514
+ set_target_properties (dispatch PROPERTIES
515
+ IMPORTED_LOCATION ${SWIFT_PATH_TO_LIBDISPATCH_BUILD} /src/.libs/libdispatch.so )
516
+
517
+ set (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH TRUE )
518
+ endif ()
519
+
510
520
add_subdirectory (lib )
511
521
add_subdirectory (tools )
Original file line number Diff line number Diff line change @@ -14,7 +14,17 @@ if(APPLE)
14
14
list (APPEND SourceKitSupport_sources ${SourceKitSupport_Darwin_sources} )
15
15
endif ()
16
16
17
+ set (SOURCEKIT_SUPPORT_DEPEND swiftBasic clangBasic clangRewrite )
18
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
19
+ list (APPEND SOURCEKIT_SUPPORT_DEPEND dispatch )
20
+ endif ()
21
+
22
+ set (SOURCEKIT_SUPPORT_DEPEND swiftBasic clangBasic clangRewrite )
23
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
24
+ list (APPEND SOURCEKIT_SUPPORT_DEPEND dispatch BlocksRuntime )
25
+ endif ()
26
+
17
27
add_sourcekit_library (SourceKitSupport
18
28
${SourceKitSupport_sources}
19
- DEPENDS swiftBasic clangBasic clangRewrite
29
+ DEPENDS ${SOURCEKIT_SUPPORT_DEPEND}
20
30
)
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 )
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
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 )
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 @@ -1910,6 +1910,8 @@ for host in "${ALL_HOSTS[@]}"; do
1910
1910
-DSWIFT_PATH_TO_LLVM_BUILD:PATH=" ${llvm_build_dir} "
1911
1911
-DSWIFT_PATH_TO_CMARK_SOURCE:PATH=" ${CMARK_SOURCE_DIR} "
1912
1912
-DSWIFT_PATH_TO_CMARK_BUILD:PATH=" $( build_directory ${host} cmark) "
1913
+ -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE:PATH=" ${LIBDISPATCH_SOURCE_DIR} "
1914
+ -DSWIFT_PATH_TO_LIBDISPATCH_BUILD:PATH=" $( build_directory ${host} libdispatch) "
1913
1915
)
1914
1916
1915
1917
if [[ " ${CMAKE_GENERATOR} " == " Xcode" ]] ; then
You can’t perform that action at this time.
0 commit comments