summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-19 23:35:30 +0800
committerruki <[email protected]>2023-03-19 23:35:30 +0800
commit3bffb973b717facc6fe7c0728a8993ff03ce9c87 (patch)
tree7392a9f86e1ad39e683cec0637b9f894144791dd /xmake/modules
parentb9720e762dd13bae9c9943b3e4a917ef5527a5b6 (diff)
disable ccache for msvc #3532
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/cache/build_cache.lua6
1 files changed, 6 insertions, 0 deletions
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