commit: 3f2c61f45985e9fb34d0ea03566a60a63c6c31b6 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Nov 8 19:39:34 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Nov 13 06:16:28 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f2c61f4
ninja-utils.eclass: Warn if NINJAOPTS diable jobserver support 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 <mgorny <AT> gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/44539 Closes: https://github.com/gentoo/gentoo/pull/44539 Signed-off-by: Sam James <sam <AT> gentoo.org> 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}" }
