From d935b8d62ce58071786904c6d9e4ce477ab91e6f Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:55:09 +0700 Subject: [PATCH] Add note about makeflags and ninja parallelism --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index af91374fe19..f7844bf6ac7 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,20 @@ in the Installation Guide. powerful machines, you might even consider `-j16`, as building with more jobs than CPU cores can speed things up further. + Alternatively, the `MAKEFLAGS` environment variable can be used. + In this case, only provide the flag itself, for example + `export MAKEFLAGS="-j4"`. + + Note that the compilation may nonetheless uses a different number of + threads, because sometimes `ninja` is used. + Unfortunately, [there is no way to control number of jobs `ninja` uses + from environment variables](https://github.com/ninja-build/ninja/issues/1482). + See also https://github.com/sagemath/sage/issues/38950. + + If the [Meson build system](https://doc-release--sagemath.netlify.app/html/en/installation/meson) + is used, the number of jobs running in parallel passed to `meson compile` will be respected, + because everything are managed by `ninja`. + To reduce the terminal output during the build, type `export V=0`. (`V` stands for "verbosity".)