public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/3] multiprocessing.eclass: consider (GNU)MAKEFLAGS
@ 2023-10-04 13:06 Florian Schmaus
  2023-10-04 13:06 ` [gentoo-dev] [PATCH 1/3] multiprocessing.eclass: consider (GNU)MAKEFLAGS, add get_makeopts_{jobs,loadavg} Florian Schmaus
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Schmaus @ 2023-10-04 13:06 UTC (permalink / raw
  To: gentoo-dev, base-system; +Cc: Florian Schmaus

We'd like portage to provide a sane default with of the "makeopts",
i.e., the maximum number of parallel jobs (--jobs) and the maximum
load average (--load-average) that build systems should try to
establish at once.

However, while --jobs is a pretty standard feature for Make-ish build
systems, --load-average is not. For example, it is not provided by BSD
Make. As such, it was decided that portage should set --load-average
in GNUMAKEFLAGS, instead of MAKEOPTS (see
https://marc.info/?l=gentoo-dev&m=169027605717531&w=2 and
https://github.com/gentoo/portage/pull/1072).

As a result, the multiprocessing.eclass should now also try to extract
the value for --jobs and --load-average not only from MAKEOPTS, but
also from (GNU)MAKEFLAGS.

While we add it, we also overhaul multiprocessing.eclass's API by
providing two new simple methods to extract the values:
get_multiprocessing_jobs() and get_multiprocessing_loadavg().

PR at https://github.com/gentoo/gentoo/pull/32385

Florian Schmaus (3):
  multiprocessing.eclass: consider (GNU)MAKEFLAGS, add
    get_makeopts_{jobs,loadavg}
  ninja-utils.eclass: use get_makeopts_{jobs,loadavg}
  meson.eclass: use get_makeopts_{jobs,loadavg}

 eclass/meson.eclass                           |  4 +-
 eclass/multiprocessing.eclass                 | 40 ++++++++++++++++---
 eclass/ninja-utils.eclass                     |  3 +-
 eclass/tests/multiprocessing_makeopts_jobs.sh | 24 ++++++++++-
 4 files changed, 61 insertions(+), 10 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-04 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 13:06 [gentoo-dev] [PATCH 0/3] multiprocessing.eclass: consider (GNU)MAKEFLAGS Florian Schmaus
2023-10-04 13:06 ` [gentoo-dev] [PATCH 1/3] multiprocessing.eclass: consider (GNU)MAKEFLAGS, add get_makeopts_{jobs,loadavg} Florian Schmaus
2023-10-04 13:06 ` [gentoo-dev] [PATCH 2/3] ninja-utils.eclass: use get_makeopts_{jobs,loadavg} Florian Schmaus
2023-10-04 13:06 ` [gentoo-dev] [PATCH 3/3] meson.eclass: " Florian Schmaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox