From b83b73e050cf3dc1b3de303f310c99a2bf6b8df3 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 15 May 2022 15:01:32 +0800 Subject: load toolchain configs for distcc --- xmake/modules/private/service/distcc_build/server_session.lua | 3 ++- xmake/modules/private/service/server_config.lua | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xmake/modules/private/service/distcc_build/server_session.lua b/xmake/modules/private/service/distcc_build/server_session.lua index 419ae2f1c..09ecb3c8d 100644 --- a/xmake/modules/private/service/distcc_build/server_session.lua +++ b/xmake/modules/private/service/distcc_build/server_session.lua @@ -189,7 +189,8 @@ function server_session:_tool(name, opt) local cachekey = name .. (plat or "") .. (arch or "") .. toolkind local cacheinfo = self:_cache():get(cachekey) if not cacheinfo then - local toolchain_inst = toolchain.load(name, {plat = plat, arch = arch}) + local toolchain_configs = (config.get("distcc_build.toolchains") or {})[name] + local toolchain_inst = toolchain.load(name, table.join({plat = plat, arch = arch}, toolchain_configs)) if toolchain_inst:check() then local program, toolname = toolchain_inst:tool(toolkind) assert(program, "%s/%s not found!", name, toolkind) diff --git a/xmake/modules/private/service/server_config.lua b/xmake/modules/private/service/server_config.lua index 93a06c61b..a4929e079 100644 --- a/xmake/modules/private/service/server_config.lua +++ b/xmake/modules/private/service/server_config.lua @@ -51,6 +51,10 @@ function _generate_configfile() distcc_build = { listen = "0.0.0.0:9692", workdir = path.join(servicedir, "distcc_build"), + toolchains = { + ndk = { + } + } } } -- cgit v1.3.1