From bdc0b7cf8fff9f997c55daf3978fe2462ae5fbc7 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 4 Apr 2019 16:16:12 -0700 Subject: [PATCH] [IndexStore] Enable blocks support on Linux builds --- tools/IndexStore/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/IndexStore/CMakeLists.txt b/tools/IndexStore/CMakeLists.txt index 1bcfc073478..bf0707051eb 100644 --- a/tools/IndexStore/CMakeLists.txt +++ b/tools/IndexStore/CMakeLists.txt @@ -49,6 +49,10 @@ if(APPLE) set_property(TARGET IndexStore APPEND_STRING PROPERTY LINK_FLAGS ${INDEXSTORE_LINK_FLAGS}) +else() + # Blocks are off by default on non-darwin platforms. + target_compile_options(IndexStore PRIVATE -fblocks) + target_link_libraries(IndexStore PRIVATE BlocksRuntime) endif() if (LLVM_INSTALL_TOOLCHAIN_ONLY)