summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-14 16:10:08 +0800
committerruki <[email protected]>2022-05-14 16:10:08 +0800
commit6514515c82b432089e01cb6e7733bd385e735097 (patch)
tree47a6d676bad06a4c941ab2b3dedea9857f4c07ba
parent38f777965f40b80119144ce4f7005f14b8369b18 (diff)
add njob config
-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