[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
a4425cc914.
This commit is contained in:
@@ -276,7 +276,7 @@ if(LLVM_CCACHE_BUILD)
|
||||
set(LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros"
|
||||
CACHE STRING "Parameters to pass through to ccache")
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
if(NOT CMAKE_HOST_WIN32)
|
||||
set(CCACHE_PROGRAM "${LLVM_CCACHE_PARAMS} ${CCACHE_PROGRAM}")
|
||||
if (LLVM_CCACHE_MAXSIZE)
|
||||
set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")
|
||||
|
||||
Reference in New Issue
Block a user