diff options
| author | ruki <[email protected]> | 2022-05-13 23:49:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-13 23:49:04 +0800 |
| commit | 2ff45f35b6e2c68ef4e9b84374e46bd8a204d4d2 (patch) | |
| tree | 709ae7b420af0ed25c4758d5b812776e88903b69 /xmake/modules/private/async | |
| parent | ced902127370a7d81cc563b4d4079cb34ff18ff8 (diff) | |
mark distcc-able jobs
Diffstat (limited to 'xmake/modules/private/async')
| -rw-r--r-- | xmake/modules/private/async/jobpool.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/private/async/jobpool.lua b/xmake/modules/private/async/jobpool.lua index 458b8802d..dfcf2b6d5 100644 --- a/xmake/modules/private/async/jobpool.lua +++ b/xmake/modules/private/async/jobpool.lua @@ -43,8 +43,9 @@ end -- jobpool:add(job, rootjob2) -- jobpool:add(job, rootjob3) -- -function jobpool:newjob(name, run) - return {name = name, run = run} +function jobpool:newjob(name, run, opt) + opt = opt or {} + return {name = name, run = run, distcc = opt.distcc} end -- add run job to the given job node @@ -54,11 +55,12 @@ end -- -- @param name the job name -- @param run the run command/script --- @param opt the options (rootjob) +-- @param opt the options (rootjob, distcc) +-- we can support distcc build if distcc is true -- function jobpool:addjob(name, run, opt) opt = opt or {} - return self:add({name = name, run = run}, opt.rootjob) + return self:add({name = name, run = run, distcc = opt.distcc}, opt.rootjob) end -- add job to the given job node |
