From e639c493025b5d6c5cbdbe588759d34ff8d772b4 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 1 Nov 2022 22:54:09 +0800 Subject: disable ccache for c++modules --- xmake/modules/core/tools/cl.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/modules/core/tools/cl.lua') diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 31bdce256..7905668a9 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -514,6 +514,7 @@ end -- do compile function _compile(self, sourcefile, objectfile, compflags, opt) + opt = opt or {} local function _compile_fallback() local program, argv = compargv(self, sourcefile, objectfile, compflags, opt) return vstool.iorunv(program, argv, {envs = self:runenvs()}) @@ -524,7 +525,7 @@ function _compile(self, sourcefile, objectfile, compflags, opt) cppinfo = distcc_build_client.singleton():compile(program, argv, {envs = self:runenvs(), preprocess = _preprocess, compile = _compile_preprocessed_file, compile_fallback = _compile_fallback, target = opt.target, tool = self, remote = true}) - elseif build_cache.is_enabled() and build_cache.is_supported(self:kind()) then + elseif build_cache.is_enabled(opt.target) and build_cache.is_supported(self:kind()) then local program, argv = compargv(self, sourcefile, objectfile, compflags, table.join(opt, {rawargs = true})) cppinfo = build_cache.build(program, argv, {envs = self:runenvs(), preprocess = _preprocess, compile = _compile_preprocessed_file, compile_fallback = _compile_fallback, -- cgit v1.3.1