Skip to content

Commit ffbd6ba

Browse files
authored
[CMake] Fix the check for Windows vs ccache (#137238)
Only the host OS matters for how to interact with ccache, not the target OS that we may be cross compiling for. This mistake seems to have been present all since support for ccache on Windows was added in a4425cc.
1 parent 2168455 commit ffbd6ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ if(LLVM_CCACHE_BUILD)
276276
set(LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros"
277277
CACHE STRING "Parameters to pass through to ccache")
278278

279-
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
279+
if(NOT CMAKE_HOST_WIN32)
280280
set(CCACHE_PROGRAM "${LLVM_CCACHE_PARAMS} ${CCACHE_PROGRAM}")
281281
if (LLVM_CCACHE_MAXSIZE)
282282
set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")

0 commit comments

Comments
 (0)