diff options
| author | ruki <[email protected]> | 2024-02-06 22:37:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-06 22:37:12 +0800 |
| commit | 61de5394ae8d322c0f1f89e1ee322d8adaaa07d8 (patch) | |
| tree | b90ac766d65abc419a9751f7b1f3655615e935f5 | |
| parent | 7dd4614a455be4d24ef6d8796f053f250bf92c39 (diff) | |
disable ccache for windows
| -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 |
