Skip to content

Commit f461913

Browse files
authored
Merge pull request #9685 from hamishknight/opt-in-index-data-next
2 parents 08d4717 + bcb329b commit f461913

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
@@ -932,9 +932,9 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)
932932
append("-w" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
933933
endif()
934934

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

940940
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)