File tree Expand file tree Collapse file tree 6 files changed +28
-6
lines changed Expand file tree Collapse file tree 6 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -506,5 +506,15 @@ 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
+ set (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH TRUE )
517
+ endif ()
518
+
509
519
add_subdirectory (lib )
510
520
add_subdirectory (tools )
Original file line number Diff line number Diff line change @@ -7,14 +7,12 @@ set(SourceKitSupport_sources
7
7
UIDRegistry.cpp
8
8
)
9
9
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} )
10
+ set (SOURCEKIT_SUPPORT_DEPEND swiftBasic clangBasic clangRewrite )
11
+ if (SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH )
12
+ list (APPEND SOURCEKIT_SUPPORT_DEPEND dispatch BlocksRuntime )
15
13
endif ()
16
14
17
15
add_sourcekit_library (SourceKitSupport
18
16
${SourceKitSupport_sources}
19
- DEPENDS swiftBasic clangBasic clangRewrite
17
+ DEPENDS ${SOURCEKIT_SUPPORT_DEPEND}
20
18
)
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 @@ -1987,6 +1987,8 @@ for host in "${ALL_HOSTS[@]}"; do
1987
1987
-DSWIFT_PATH_TO_LLVM_BUILD:PATH=" ${llvm_build_dir} "
1988
1988
-DSWIFT_PATH_TO_CMARK_SOURCE:PATH=" ${CMARK_SOURCE_DIR} "
1989
1989
-DSWIFT_PATH_TO_CMARK_BUILD:PATH=" $( build_directory ${host} cmark) "
1990
+ -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE:PATH=" ${LIBDISPATCH_SOURCE_DIR} "
1991
+ -DSWIFT_PATH_TO_LIBDISPATCH_BUILD:PATH=" $( build_directory ${host} libdispatch) "
1990
1992
)
1991
1993
1992
1994
if [[ " ${CMAKE_GENERATOR} " == " Xcode" ]] ; then
You can’t perform that action at this time.
0 commit comments