diff --git a/README.md b/README.md index f821113980762..6829d9a08df3b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/tools/SourceKit/CMakeLists.txt b/tools/SourceKit/CMakeLists.txt index d2ffbfd219dad..7ecd8e8a6ee9b 100644 --- a/tools/SourceKit/CMakeLists.txt +++ b/tools/SourceKit/CMakeLists.txt @@ -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") + 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)