Skip to content

Commit 6c4acf2

Browse files
committed
Merge pull request #2703 from modocache/sr-1613-sourcekit-linux-blocks
[SR-1613][SourceKit] Require blocks runtime
2 parents f2954f9 + d7e2e1f commit 6c4acf2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ For OS X, you need [the latest Xcode](https://developer.apple.com/xcode/download
5858

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

61-
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
61+
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
6262

6363
**Note:** LLDB currently requires at least `swig-1.3.40` but will successfully build
6464
with version 2 shipped with Ubuntu.

tools/SourceKit/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ function(add_sourcekit_default_compiler_flags target)
8484
ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
8585
RESULT_VAR_NAME link_flags)
8686

87+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
88+
list(APPEND c_compile_flags "-fblocks")
89+
list(APPEND link_flags "-lBlocksRuntime")
90+
endif()
91+
8792
# Convert variables to space-separated strings.
8893
_list_escape_for_shell("${c_compile_flags}" c_compile_flags)
8994
_list_escape_for_shell("${link_flags}" link_flags)

0 commit comments

Comments
 (0)