Skip to content

Commit 1e89914

Browse files
authored
Merge pull request #9684 from hamishknight/opt-in-index-data
2 parents 8bca9ca + 5fd5950 commit 1e89914

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,9 +910,9 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)
910910
append("-w" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
911911
endif()
912912

913-
# Enable '-index-store-path' on a Debug build, if the compiler supports it and for non-IDE generators.
914-
option(LLVM_DISABLE_INDEX_STORE "Disable '-index-store-path' flag" Off)
915-
if (NOT LLVM_DISABLE_INDEX_STORE AND NOT XCODE AND NOT MSVC_IDE AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
913+
# Allow enabling '-index-store-path' for non-IDE generators if the compiler supports it.
914+
option(LLVM_ENABLE_INDEX_STORE "Enable '-index-store-path' flag" Off)
915+
if (LLVM_ENABLE_INDEX_STORE AND NOT XCODE AND NOT MSVC_IDE)
916916
set(INDEX_DATA_STORE_PATH "${PROJECT_BINARY_DIR}/IndexStore" CACHE STRING "Index store path")
917917

918918
check_c_compiler_flag("-Werror -index-store-path \"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/IndexStore\"" "C_SUPPORTS_INDEX_STORE")

0 commit comments

Comments
 (0)