summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-05 00:47:31 +0800
committerruki <[email protected]>2024-06-05 00:47:31 +0800
commit195ca731798e606fbd84786d81e9e56b3a547a31 (patch)
treedeaf26fedc1d80653d401bbbdced9a72bbd3fc18
parent38ae0ac6591f098f7ed47a69b9ec01e6723575ed (diff)
fix distcc
-rw-r--r--xmake/modules/async/runjobs.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua
index 1f59a7359..c0f8d4c3d 100644
--- a/xmake/modules/async/runjobs.lua
+++ b/xmake/modules/async/runjobs.lua
@@ -192,6 +192,12 @@ function main(name, jobs, opt)
local distccjob = false
if not jobs_cb then
+ -- get free job
+ job = jobs:getfree()
+ if not job then
+ break
+ end
+
-- we can only continue to run the job with distcc if local jobs are full
if distcc and index >= local_max then
if job.distcc then
@@ -201,12 +207,6 @@ function main(name, jobs, opt)
end
end
- -- get free job
- job = jobs:getfree()
- if not job then
- break
- end
-
-- get run function
jobfunc = job.run
jobname = job.name