From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E705C158089 for ; Wed, 4 Oct 2023 13:07:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A7FD2BC0A6; Wed, 4 Oct 2023 13:07:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4B1982BC02F for ; Wed, 4 Oct 2023 13:07:19 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org, base-system@gentoo.org Cc: Florian Schmaus Subject: [gentoo-dev] [PATCH 0/3] multiprocessing.eclass: consider (GNU)MAKEFLAGS Date: Wed, 4 Oct 2023 15:06:37 +0200 Message-ID: <20231004130640.384070-1-flow@gentoo.org> X-Mailer: git-send-email 2.41.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 655375eb-6967-4f34-8c39-4f37dae4b4ae X-Archives-Hash: 6840e51ca51f59ebb096558bd28c177b 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