Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build SourceKit on Linux if dispatch is present #7392

Merged
merged 1 commit into from
Feb 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,14 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "")
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if(EXISTS ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE})
set(SWIFT_BUILD_SOURCEKIT_default TRUE)
else()
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
endif()
else()
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
set(SWIFT_BUILD_SOURCEKIT_default FALSE)
endif()
option(SWIFT_BUILD_SOURCEKIT
"Build SourceKit"
Expand Down
2 changes: 1 addition & 1 deletion tools/SourceKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
add_custom_command(
OUTPUT "${SWIFT_PATH_TO_LIBDISPATCH_BUILD}/src/.libs/libdispatch.so"
COMMAND autoreconf -fvi
COMMAND /usr/bin/env "CC=${PATH_TO_CLANG_BUILD}/bin/clang" "CXX=${PATH_TO_CLANG_BUILD}/bin/clang++" ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}/configure --prefix="${CMAKE_INSTALL_PREFIX}"
COMMAND /usr/bin/env "CC=${PATH_TO_CLANG_BUILD}/bin/clang" "CXX=${PATH_TO_CLANG_BUILD}/bin/clang++" "OBJC=${PATH_TO_CLANG_BUILD}/bin/clang" ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}/configure --prefix="${CMAKE_INSTALL_PREFIX}"
COMMAND /usr/bin/make
COMMAND /bin/mkdir -p ${SWIFT_PATH_TO_LIBDISPATCH_BUILD}/src/.libs/
COMMAND /bin/cp ${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}/src/.libs/libdispatch.so ${SWIFT_PATH_TO_LIBDISPATCH_BUILD}/src/.libs/libdispatch.so
Expand Down