summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-15 15:42:50 +0800
committerruki <[email protected]>2022-05-15 15:42:50 +0800
commit394c7d2c16caa670b46849b63b78e47fb1a428ea (patch)
treeb9d137a13bef6b3b5178f28658ee1e51cb4f116f /xmake/modules/core/tools/cl.lua
parentc51efeaa184814aa65dbe90835aeb4330c43220f (diff)
wrap distcc for cl
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua7
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
{