[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] gitlab-ci.yml: Allow custom make parallelism
From: |
Daniele Buono |
Subject: |
Re: [PATCH 1/2] gitlab-ci.yml: Allow custom make parallelism |
Date: |
Tue, 23 Feb 2021 14:34:11 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
This works, but setting this value to 1 for everybody seems a bit too
restrictive. While the gitlab ci runners don't have enough memory for
this, that's not necessarily true for every build platform, and linking
multiple targets in parallel with LTO can result in a big save in time,
so I'd prefer a customizable way.
How about adding a flag `--max-ld-procs` to configure to manually set
backend_max_links?
This would also allow setting it up to any specific number above 1,
which looking at the Makefile seems to not be possible now: because of
how the -j flag is passed from make to ninja, a compilation is either
sequential or parallel based on #cpus
On 2/23/2021 3:12 AM, Paolo Bonzini wrote:
On 23/02/21 00:01, Daniele Buono wrote:
Currently, make parallelism at build time is defined as #cpus+1. Some
build jobs may need (or benefit from) a different number. An example
is builds with LTO where, because of the huge demand of memory at link
time, gitlab runners fails if two linkers are run concurrently This
patch retains the default value of #cpus+1 but allows setting the
"JOBS" variable to a different number when applying the template
As I just found out, you can add -Dbackend_max_links=1 to the meson
command line instead if LTO is enabled.
Paolo
[PATCH 2/2] gitlab-ci.yml: Add jobs to test CFI flags, Daniele Buono, 2021/02/22