diff options
| author | ruki <[email protected]> | 2022-05-15 13:34:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-15 13:34:09 +0800 |
| commit | 7130b7d34d42b4f544134b1d0aaa66554be055ec (patch) | |
| tree | 8399dd65202381e3519e29893a7ee21d8d43a9f7 | |
| parent | ba6bd4bba6db46f771e5b24cca0dda113b9caf3a (diff) | |
get tool info
| -rw-r--r-- | xmake/core/tool/compiler.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/private/service/distcc_build/client_session.lua | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index 745453e0f..f2146233f 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -104,8 +104,6 @@ function compiler._load_tool(sourcekind, target) if not result then return nil, errors end - - -- done return result, program end diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 0006267a3..523d5fc5e 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -458,7 +458,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) -- do compile local program, argv = compargv(self, sourcefile, objectfile, compflags) if distcc_build_client.is_distccjob() then - return distcc_build_client.singleton():iorunv(program, argv, {envs = self:runenvs(), toolname = self:name()}) + return distcc_build_client.singleton():iorunv(program, argv, {envs = self:runenvs(), tool = self}) else return os.iorunv(program, argv, {envs = self:runenvs()}) end diff --git a/xmake/modules/private/service/distcc_build/client_session.lua b/xmake/modules/private/service/distcc_build/client_session.lua index 749fe9389..2d5c8ec88 100644 --- a/xmake/modules/private/service/distcc_build/client_session.lua +++ b/xmake/modules/private/service/distcc_build/client_session.lua @@ -81,7 +81,8 @@ end function client_session:iorunv(program, argv, opt) assert(self:is_opened(), "%s: has been not opened!", self) opt = opt or {} - local toolname = opt.toolname + local tool = opt.tool + local toolname = tool:name() local iorunv = assert(self["_" .. toolname .. "_iorunv"], "%s: iorunv(%s) is not supported!", self, program) return iorunv(self, program, argv, opt) end @@ -134,8 +135,10 @@ function client_session:_gcc_iorunv(program, argv, opt) -- do compile local ok = false local errors + local tool = opt.tool + local toolname = tool:name() local stream = self:stream() - if stream:send_msg(message.new_compile(self:id(), opt.toolname, flags, path.filename(sourcefile), {token = self:token()})) and + if stream:send_msg(message.new_compile(self:id(), toolname, flags, path.filename(sourcefile), {token = self:token()})) and stream:send_file(cppfile, {compress = os.filesize(cppfile) > 4096}) and stream:flush() then local recv = stream:recv_file(objectfile) if recv ~= nil then |
