diff options
| author | ruki <[email protected]> | 2022-05-15 15:42:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-15 15:42:50 +0800 |
| commit | 394c7d2c16caa670b46849b63b78e47fb1a428ea (patch) | |
| tree | b9d137a13bef6b3b5178f28658ee1e51cb4f116f /xmake/modules/core/tools/cl.lua | |
| parent | c51efeaa184814aa65dbe90835aeb4330c43220f (diff) | |
wrap distcc for cl
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index f7889e2c1..bdb3d350f 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -26,6 +26,7 @@ import("core.project.project") import("core.language.language") import("private.tools.vstool") import("private.tools.cl.parse_include") +import("private.service.distcc_build.client", {alias = "distcc_build_client"}) import("utils.progress") -- init it @@ -447,7 +448,11 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) -- use vstool to compile and enable vs_unicode_output @see https://github.com/xmake-io/xmake/issues/528 local program, argv = compargv(self, sourcefile, objectfile, compflags, opt) - return vstool.iorunv(program, argv, {envs = self:runenvs()}) + if distcc_build_client.is_distccjob() then + return distcc_build_client.singleton():iorunv(program, argv, {envs = self:runenvs(), tool = self}) + else + return vstool.iorunv(program, argv, {envs = self:runenvs()}) + end end, catch { |
