From: Simon Glass <sjg@chromium.org> LTO link steps use nproc unconditionally, flooding the machine with jobs during the link phase and reducing build efficiency. Pass NPROC=<num_jobs> alongside -j so that LTO respects the dynamic parallelism setting. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/buildman/builderthread.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 16534196d4d..6f4f257dedb 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -344,6 +344,7 @@ class BuilderThread(threading.Thread): num_jobs = max(1, nthreads // active) if num_jobs is not None: args.extend(['-j', str(num_jobs)]) + args.append(f'NPROC={num_jobs}') if self.builder.warnings_as_errors: args.append('KCFLAGS=-Werror') args.append('HOSTCFLAGS=-Werror') -- 2.43.0