From 3bffb973b717facc6fe7c0728a8993ff03ce9c87 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 19 Mar 2023 23:35:30 +0800 Subject: disable ccache for msvc #3532 --- xmake/modules/private/cache/build_cache.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmake/modules/private/cache/build_cache.lua') diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua index 24124417c..27e4cee7c 100644 --- a/xmake/modules/private/cache/build_cache.lua +++ b/xmake/modules/private/cache/build_cache.lua @@ -63,6 +63,12 @@ function is_enabled(target) result = policy end end + -- disable ccache for msvc, because cl.exe preprocessor is too slower + -- @see https://github.com/xmake-io/xmake/issues/3532 + if result == nil and is_host("windows") and + target and target.has_tool and target:has_tool("cxx", "cl") then + result = false + end if result == nil then result = config.get("ccache") end -- cgit v1.3.1