Skip to content

Commit cbe74d4

Browse files
ozhurakinashif
authored andcommitted
cmake: llvm: Invalidate toolchain capability cache
Invalidate toolchain capability cache on toolchain configuration. Signed-off-by: Oleg Zhurakivskyy <[email protected]>
1 parent bee7d1e commit cbe74d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmake/toolchain/llvm/generic.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3+
find_appropriate_cache_directory(USER_CACHE_DIR)
4+
5+
if((NOT "${USER_CACHE_DIR}" STREQUAL "") AND (EXISTS "${USER_CACHE_DIR}"))
6+
message(STATUS "Invalidating toolchain capability cache in ${USER_CACHE_DIR}")
7+
execute_process(COMMAND
8+
${CMAKE_COMMAND} -E remove_directory "${USER_CACHE_DIR}")
9+
endif()
10+
311
if(DEFINED $ENV{CLANG_ROOT_DIR})
412
set(TOOLCHAIN_HOME ${CLANG_ROOT}/bin/)
513
endif()

0 commit comments

Comments
 (0)