Skip to content

[SR-1613][SourceKit] Require blocks runtime #2703

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

Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For OS X, you need [the latest Xcode](https://developer.apple.com/xcode/download

For Ubuntu, you'll need the following development dependencies:

sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config
sudo apt-get install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev

**Note:** LLDB currently requires at least `swig-1.3.40` but will successfully build
with version 2 shipped with Ubuntu.
Expand Down
5 changes: 5 additions & 0 deletions tools/SourceKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ function(add_sourcekit_default_compiler_flags target)
ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
RESULT_VAR_NAME link_flags)

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this has been merged already, but should we be considering other non-Darwin platforms here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. I'm worried about SR-710 getting done in time for Swift 3.0, so I'm reducing scope a bit here. Ideally, I'd like SourceKit to run everywhere. Were it able to do so, we'd probably want to change this to handle more than just Linux.

list(APPEND c_compile_flags "-fblocks")
list(APPEND link_flags "-lBlocksRuntime")
endif()

# Convert variables to space-separated strings.
_list_escape_for_shell("${c_compile_flags}" c_compile_flags)
_list_escape_for_shell("${link_flags}" link_flags)
Expand Down