diff options
| -rw-r--r-- | xmake/modules/core/tools/cosmocc.lua | 5 |
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 |
