diff options
| author | ruki <[email protected]> | 2022-11-01 22:54:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-11-01 22:54:09 +0800 |
| commit | e639c493025b5d6c5cbdbe588759d34ff8d772b4 (patch) | |
| tree | 1e91823aee729fb798f61e38480a2ad61a580e06 /xmake/modules/core | |
| parent | 055c7aa757886af0faa87c21e407495ead4c066e (diff) | |
disable ccache for c++modules
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 5 |
2 files changed, 5 insertions, 3 deletions
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, diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 1c3a29c01..897103404 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -555,6 +555,7 @@ end -- do compile function _compile(self, sourcefile, objectfile, compflags, opt) + opt = opt or {} local program, argv = compargv(self, sourcefile, objectfile, compflags) local function _compile_fallback() return os.iorunv(program, argv, {envs = self:runenvs()}) @@ -564,7 +565,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, 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 cppinfo = build_cache.build(program, argv, {envs = self:runenvs(), preprocess = _preprocess, compile = _compile_preprocessed_file, compile_fallback = _compile_fallback, tool = self}) @@ -614,7 +615,7 @@ function compargv(self, sourcefile, objectfile, flags) end -- compile the source file -function compile(self, sourcefile, objectfile, dependinfo, flags) +function compile(self, sourcefile, objectfile, dependinfo, flags, opt) -- ensure the object directory os.mkdir(path.directory(objectfile)) |
