summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-06 22:37:12 +0800
committerruki <[email protected]>2024-02-06 22:37:12 +0800
commit61de5394ae8d322c0f1f89e1ee322d8adaaa07d8 (patch)
treeb90ac766d65abc419a9751f7b1f3655615e935f5
parent7dd4614a455be4d24ef6d8796f053f250bf92c39 (diff)
disable ccache for windows
-rw-r--r--xmake/modules/core/tools/cosmocc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cosmocc.lua b/xmake/modules/core/tools/cosmocc.lua
index 68b531a2a..60f25a3f0 100644
--- a/xmake/modules/core/tools/cosmocc.lua
+++ b/xmake/modules/core/tools/cosmocc.lua
@@ -45,9 +45,14 @@ end
-- compile the source file
function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
+ opt = opt or {}
if is_host("windows") then
sourcefile = sourcefile:gsub("\\", "/")
objectfile = objectfile:gsub("\\", "/")
+ local target = opt.target
+ if target then
+ target:set("policy", "build.ccache", false)
+ end
end
return _super.compile(self, sourcefile, objectfile, dependinfo, flags, table.join(opt, {shell = true}))
end