parser: fixup "fix --jobs so jobs scaling is applied correctly"

65ba20b955 provides a fix for job
scaling but during a merge conflict part of the patch got dropped.
This is the missing portion of the patch that was approved as part
of MR703

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/703
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2021-02-10 19:24:43 -08:00
parent 65ba20b955
commit 681c976550

View file

@ -1324,6 +1324,8 @@ static long compute_jobs(long n, long j)
static void setup_parallel_compile(long ncpus, long maxcpus)
{
/* jobs and parallel_max set by default, config or args */
if (jobs < 0 || jobs == JOBS_AUTO)
jobs_scale = 1;
jobs = compute_jobs(ncpus, jobs);
jobs_max = compute_jobs(maxcpus, jobs_max);