diff options
| author | ruki <[email protected]> | 2022-05-18 00:42:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-18 00:42:46 +0800 |
| commit | 886ea9eeac7a3554b229c87de965d43791d5e6e5 (patch) | |
| tree | e81d18dc0fa2d6849a1dc4a35d22cd17db05aa93 | |
| parent | 91d8197cef25c656b9de6aa95076c2d37f0206c2 (diff) | |
support win cmdargv for distcc
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 5 | ||||
| -rw-r--r-- | xmake/modules/private/service/distcc_build/server_session.lua | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 268fe2472..fc3ef5622 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -449,7 +449,7 @@ function _preprocess(program, argv, opt) table.insert(cppflags, "-P") table.insert(cppflags, "-Fi" .. cppfile) table.insert(cppflags, sourcefile) - local outdata, errdata = vstool.iorunv(program, cppflags, opt) + local outdata, errdata = vstool.iorunv(program, winos.cmdargv(cppflags), opt) return outdata, errdata, sourcefile, objectfile, cppfile, flags end @@ -505,10 +505,11 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) end -- 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) if distcc_build_client.is_distccjob() and distcc_build_client.singleton():has_freejobs() then + local program, argv = compargv(self, sourcefile, objectfile, compflags, table.join(opt, {rawargs = true})) return distcc_build_client.singleton():compile(program, argv, {envs = self:runenvs(), preprocess = _preprocess, tool = self, target = opt.target}) else + local program, argv = compargv(self, sourcefile, objectfile, compflags, opt) return vstool.iorunv(program, argv, {envs = self:runenvs()}) end end, diff --git a/xmake/modules/private/service/distcc_build/server_session.lua b/xmake/modules/private/service/distcc_build/server_session.lua index fb2617492..8f4939c80 100644 --- a/xmake/modules/private/service/distcc_build/server_session.lua +++ b/xmake/modules/private/service/distcc_build/server_session.lua @@ -237,7 +237,7 @@ end function server_session:_cl_compile(toolname, flags, sourcefile, objectfile, opt) local program, toolname_real, runenvs = self:_tool(opt.toolchain, opt) assert(toolname_real == toolname, "toolname is not matched, %s != %s", toolname, toolname_real) - vstool.iorunv(program, table.join(flags, "-Fo" .. objectfile, sourcefile), {envs = runenvs}) + vstool.iorunv(program, winos.cmdargv(table.join(flags, "-Fo" .. objectfile, sourcefile)), {envs = runenvs}) end function server_session:__tostring() |
