diff options
| -rw-r--r-- | xmake/modules/private/service/distcc_build/client_session.lua | 7 | ||||
| -rw-r--r-- | xmake/modules/private/service/distcc_build/server_session.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/private/service/message.lua | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/xmake/modules/private/service/distcc_build/client_session.lua b/xmake/modules/private/service/distcc_build/client_session.lua index 2d5c8ec88..b6133339b 100644 --- a/xmake/modules/private/service/distcc_build/client_session.lua +++ b/xmake/modules/private/service/distcc_build/client_session.lua @@ -137,8 +137,13 @@ function client_session:_gcc_iorunv(program, argv, opt) local errors local tool = opt.tool local toolname = tool:name() + local toolkind = tool:kind() + local plat = tool:plat() + local arch = tool:arch() + local toolchain = tool:toolchain():name() local stream = self:stream() - if stream:send_msg(message.new_compile(self:id(), toolname, flags, path.filename(sourcefile), {token = self:token()})) and + if stream:send_msg(message.new_compile(self:id(), toolname, toolkind, plat, arch, toolchain, + 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 diff --git a/xmake/modules/private/service/distcc_build/server_session.lua b/xmake/modules/private/service/distcc_build/server_session.lua index 218771e03..f45d9acf0 100644 --- a/xmake/modules/private/service/distcc_build/server_session.lua +++ b/xmake/modules/private/service/distcc_build/server_session.lua @@ -99,8 +99,8 @@ function server_session:compile(respmsg) { function () local flags = body.flags - local compiler = body.compiler - os.vrunv(compiler, table.join(flags, "-o", objectfile, sourcefile)) + local toolname = body.toolname + os.vrunv(toolname, table.join(flags, "-o", objectfile, sourcefile)) return os.isfile(objectfile) end, catch diff --git a/xmake/modules/private/service/message.lua b/xmake/modules/private/service/message.lua index 82ec2e6ff..e4af25945 100644 --- a/xmake/modules/private/service/message.lua +++ b/xmake/modules/private/service/message.lua @@ -214,13 +214,17 @@ function new_data(session_id, size, opt) end -- new compile command message -function new_compile(session_id, compiler, flags, sourcename, opt) +function new_compile(session_id, toolname, toolkind, plat, arch, toolchain, flags, sourcename, opt) opt = opt or {} return _new({ code = message.CODE_COMPILE, session_id = session_id, token = opt.token, - compiler = compiler, + toolname = toolname, + toolkind = toolkind, + plat = plat, + arch = arch, + toolchain = toolchain, flags = flags, sourcename = sourcename }) |
