summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/service/distcc_build/server_session.lua3
-rw-r--r--xmake/modules/private/service/server_config.lua4
2 files changed, 6 insertions, 1 deletions
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 = {
+ }
+ }
}
}