pstree attached
Created attachment 526842 [details] 26.20180408-021256 pstree
It looks like scripts/bootstrap/bootstrap.sh supports a EXTRA_BAZEL_ARGS variable which be might be able to add a --local_resources argument.
Created attachment 527352 [details] 24.20180414-110100 seems, that ninja ignores the -j1 whereas make has it set
Created attachment 532542 [details, diff] 0001-dev-util-bazel-make-build-respect-MAKEOPTS.patch This fixes it mostly on my machine. there is a short bit in the beginning when its extracting that uses more than one core but after that its only one at a time for everything else.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=441d853f5076a066ca9d6901a01158191a3208a2 commit 441d853f5076a066ca9d6901a01158191a3208a2 Author: Jason Zaman <perfinion@gentoo.org> AuthorDate: 2018-05-21 17:57:24 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-05-21 18:10:44 +0000 dev-util/bazel: make build respect MAKEOPTS Bug: https://bugs.gentoo.org/652776 Package-Manager: Portage-2.3.38, Repoman-2.3.9 dev-util/bazel/bazel-0.10.1.ebuild | 5 +++-- dev-util/bazel/bazel-0.13.0.ebuild | 5 +++-- dev-util/bazel/bazel-0.7.0.ebuild | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-)