From 3f2c61f45985e9fb34d0ea03566a60a63c6c31b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 8 Nov 2025 20:39:34 +0100 Subject: [PATCH] ninja-utils.eclass: Warn if NINJAOPTS diable jobserver support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warn if NINJAOPTS specifies "-j" option and a jobserver is available, since it will implicitly disable the jobserver support. Bug: https://bugs.gentoo.org/692576 Signed-off-by: Michał Górny Part-of: https://github.com/gentoo/gentoo/pull/44539 Closes: https://github.com/gentoo/gentoo/pull/44539 Signed-off-by: Sam James --- eclass/ninja-utils.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index 0ac23b7d4799..1ffb358d7fa1 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -116,6 +116,9 @@ get_NINJAOPTS() { # ninja only uses jobserver if -j is not passed NINJAOPTS+=" -j$(get_makeopts_jobs 999)" fi + elif _ninja_uses_jobserver && [[ ${NINJAOPTS} == *-j* ]]; then + ewarn "Jobserver detected, but NINJAOPTS specifies -j option." + ewarn "To enable ninja jobserver support, remove -j from NINJAOPTS." fi echo "${NINJAOPTS}" }