[pacman-dev] [PATCH 0/1] makepkg: add support for parallel jobs during compilation
Hi, I'm new to Arch community, so I don't know if there's a reason for not having this implemented yet. Whenever I'm trying to compile my own kernel or any other bigger package, makepkg command ends up taking much more time than it should because it doesn't compile with multiple parallel jobs. I implemented this simple patch that adds the -jN option to makepkg and then propagates two variables JOBS and JOBS_ARG to PKGBUILD. With this, the build scripts may support parallel jobs during compilation. E.g. to compile kernel, PKGBUILD could use 'make $JOBS_ARG all' instead of 'make all'. Comments are welcome. Thanks, David --- David Cohen (1): makepkg: add support for parallel jobs during compilation doc/makepkg.8.asciidoc | 7 +++++++ scripts/makepkg.sh.in | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) -- 2.33.0
Currently PKGBUILD has no way to receive from makepkg if it wants to use
parallel jobs during compilation. This patch adds the '-jN' option to
makepkg, which will propagate to PKGBUILD 2 variables:
JOBS is 0 if options is not used, or N otherwise.
JOBS_ARG is an empty string is option is not used, or '-jN' otherwise.
If the PKGBUILD script does not support parallel jobs, this option will
have no impact during the compilation.
Signed-off-by: David Cohen
On Mon, Sep 06, 2021 at 07:33:17PM +0000, David Cohen via pacman-dev wrote:
Currently PKGBUILD has no way to receive from makepkg if it wants to use parallel jobs during compilation. This patch adds the '-jN' option to makepkg, which will propagate to PKGBUILD 2 variables: JOBS is 0 if options is not used, or N otherwise. JOBS_ARG is an empty string is option is not used, or '-jN' otherwise.
If the PKGBUILD script does not support parallel jobs, this option will have no impact during the compilation.
Hi David. Thank you for your contribution! It appears to me that you can achieve this by doing proper changes here. https://gitlab.archlinux.org/pacman/pacman/-/blob/master/etc/makepkg.conf.in... I wonder if this is rather another way to do it through the CLI, and I wonder if we can evaluate its usefulness on those grounds :) Cheers! -Santiago
participants (2)
-
David Cohen
-
Santiago Torres Arias