From 8c7c04e896c10b5b78e739d590f34061099f8f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=95=AD=E6=BE=A7=E9=82=A6?= <45505768+shou692199@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:53:33 +0800 Subject: [PATCH 1/2] [SYCL] Fix build on Windows when ccache enabled (#9954) --- ggml/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index aa405e4d0..15101ab15 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1068,7 +1068,11 @@ if (GGML_CCACHE) if (GGML_CCACHE_FOUND) # TODO: should not be set globally - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + if (GGML_SYCL) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache compiler_type=clang-cl") + else () + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + endif () set(ENV{CCACHE_SLOPPINESS} time_macros) message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.") else() From 5d7bb10ee5a9815a01718d142c59719d22453064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=95=AD=E6=BE=A7=E9=82=A6?= <45505768+shou692199@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:04:02 +0800 Subject: [PATCH 2/2] take effect only on windows and force it to icl --- ggml/src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index 15101ab15..634d3f296 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1068,8 +1068,8 @@ if (GGML_CCACHE) if (GGML_CCACHE_FOUND) # TODO: should not be set globally - if (GGML_SYCL) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache compiler_type=clang-cl") + if (GGML_SYCL AND WIN32) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache compiler_type=icl") else () set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) endif ()