From 61de5394ae8d322c0f1f89e1ee322d8adaaa07d8 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 6 Feb 2024 22:37:12 +0800 Subject: disable ccache for windows --- xmake/modules/core/tools/cosmocc.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.3.1