[PATCH] src/main.c: Add -J to detect number of job slots based on nproc.

2024-04-11 Thread Matt Staveley-Taylor
Add the -J/--detect-job-slots flag as an shorthand equivalent for -j$(nproc). The help message is deliberately left ambiguous so that we could change it to nproc + 1 in future, if desired. Signed-off-by: Matt Staveley-Taylor --- Browsing the mailing list I can see that the behaviour of -j

[PATCH v2] src/main.c: Add -J to detect number of job slots based on nproc.

2024-04-12 Thread Matt Staveley-Taylor
expanded into -jN (which *does* get passed through). Signed-off-by: Matt Staveley-Taylor --- Changes in v2: - Use nproc + 2 rather than nproc. This is what the ninja build system uses [1], so should not cause any surprises. - Don't pass -J through to sub-makes in MAKEFLAGS. This was causing