summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-11-01 23:35:02 +0800
committerGitHub <[email protected]>2022-11-01 23:35:02 +0800
commit1912c580ec4f817ef40aa44dc893cbf4c1d8db8e (patch)
tree47d5ff5309a5ed549c9da407189a2001dd3c5575 /xmake/modules/core/tools/cl.lua
parente3f66afa1533661eda37f934357623134dd0e467 (diff)
parent3abe482e186a3851f9349d5011e93d8c529de2d8 (diff)
Merge pull request #3001 from xmake-io/modules
Incremental compilation support for modules #3000
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua3
1 files changed, 2 insertions, 1 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,