summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/service/client_config.lua3
-rw-r--r--xmake/modules/private/service/distcc_build/client.lua3
2 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/private/service/client_config.lua b/xmake/modules/private/service/client_config.lua
index 58aaf65e5..fd3a4bc33 100644
--- a/xmake/modules/private/service/client_config.lua
+++ b/xmake/modules/private/service/client_config.lua
@@ -48,6 +48,9 @@ function _generate_configfile()
},
distcc_build = {
hosts = {
+ -- optional configs
+ --
+ -- njob: max jobs
{connect = "127.0.0.1:9692", token = token}
}
}
diff --git a/xmake/modules/private/service/distcc_build/client.lua b/xmake/modules/private/service/distcc_build/client.lua
index dd9fb4173..4fce4c64f 100644
--- a/xmake/modules/private/service/distcc_build/client.lua
+++ b/xmake/modules/private/service/distcc_build/client.lua
@@ -77,6 +77,7 @@ function distcc_build_client:hosts_set(hosts)
hostinfo.port = port
hostinfo.user = user
hostinfo.token = host.token
+ hostinfo.njob = host.njob
table.insert(hostinfos, hostinfo)
end
end
@@ -302,7 +303,7 @@ function distcc_build_client:_connect_host(host)
status.hosts[addr .. ":" .. port] = {
addr = addr, port = port, token = token,
connected = ok, session_id = session_id,
- ncpu = ncpu, njob = njob}
+ ncpu = ncpu, njob = host.njob or njob}
self:status_save()
end