Skip to content

Commit d935b8d

Browse files
committed
Add note about makeflags and ninja parallelism
1 parent f48da11 commit d935b8d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,20 @@ in the Installation Guide.
341341
powerful machines, you might even consider `-j16`, as building with
342342
more jobs than CPU cores can speed things up further.
343343

344+
Alternatively, the `MAKEFLAGS` environment variable can be used.
345+
In this case, only provide the flag itself, for example
346+
`export MAKEFLAGS="-j4"`.
347+
348+
Note that the compilation may nonetheless uses a different number of
349+
threads, because sometimes `ninja` is used.
350+
Unfortunately, [there is no way to control number of jobs `ninja` uses
351+
from environment variables](https://github.com/ninja-build/ninja/issues/1482).
352+
See also https://github.com/sagemath/sage/issues/38950.
353+
354+
If the [Meson build system](https://doc-release--sagemath.netlify.app/html/en/installation/meson)
355+
is used, the number of jobs running in parallel passed to `meson compile` will be respected,
356+
because everything are managed by `ninja`.
357+
344358
To reduce the terminal output during the build, type `export V=0`.
345359
(`V` stands for "verbosity".)
346360

0 commit comments

Comments
 (0)