clarify configure option to limit the number of cores used by Guix.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
84293df92f
commit
b84b45ca06
16
configure.ac
16
configure.ac
|
@ -20,16 +20,16 @@ AC_CONFIG_FILES([
|
||||||
resources/packages/i945-thinkpads-install-utilities/Makefile
|
resources/packages/i945-thinkpads-install-utilities/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_SUBST([GUIX_BUILD_CORES], [])
|
AC_SUBST([GUIX_BUILD_MAX_CORES], [])
|
||||||
|
|
||||||
# --with-guix-build-cores
|
# --with-guix-build-max-cores
|
||||||
AC_ARG_WITH([guix-build-cores],
|
AC_ARG_WITH([guix-build-max-cores],
|
||||||
[AS_HELP_STRING([--with-guix-build-cores=N],
|
[AS_HELP_STRING([--with-guix-build-max-cores=N],
|
||||||
[Force guix build the use of up to N CPU cores for the build.
|
[Force guix build the use of up to N CPU cores for the build.
|
||||||
Lowering the number of cores used can help when there is not
|
Lowering the number of cores used can help when there is not
|
||||||
enough RAM per core.])],
|
enough RAM per core.])],
|
||||||
[GUIX_BUILD_CORES=$withval],
|
[GUIX_BUILD_MAX_CORES=$withval],
|
||||||
[GUIX_BUILD_CORES=0])
|
[GUIX_BUILD_MAX_CORES=0])
|
||||||
|
|
||||||
AC_CHECK_PROG([FOUND_GUIX], [guix], [guix])
|
AC_CHECK_PROG([FOUND_GUIX], [guix], [guix])
|
||||||
AS_IF([test x"$FOUND_GUIX" = x""],
|
AS_IF([test x"$FOUND_GUIX" = x""],
|
||||||
|
@ -45,4 +45,6 @@ AC_OUTPUT
|
||||||
|
|
||||||
AS_ECHO(["Configuration options:"])
|
AS_ECHO(["Configuration options:"])
|
||||||
|
|
||||||
AS_ECHO([" GUIX_BUILD_CORES: $GUIX_BUILD_CORES"])
|
AS_IF([test x"$GUIX_BUILD_MAX_CORES" = x"0"],
|
||||||
|
AS_ECHO([" GUIX_BUILD_MAX_CORES: not limited."]),
|
||||||
|
AS_ECHO([" GUIX_BUILD_MAX_CORES: $GUIX_BUILD_MAX_CORES"]))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
# Copyright (C) 2023,2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -71,7 +71,7 @@ $(RELEASE_DIR)/packages_src.tar: Makefile
|
||||||
source_guix_profile && \
|
source_guix_profile && \
|
||||||
guix time-machine --commit=$(GUIX_REVISION) -- \
|
guix time-machine --commit=$(GUIX_REVISION) -- \
|
||||||
build \
|
build \
|
||||||
-c $(GUIX_BUILD_CORES) \
|
-c $(GUIX_BUILD_MAX_CORES) \
|
||||||
-L $(TOPDIR)/resources/guix/ \
|
-L $(TOPDIR)/resources/guix/ \
|
||||||
-L $(TOPDIR)/resources/guix/gnuboot/patches \
|
-L $(TOPDIR)/resources/guix/gnuboot/patches \
|
||||||
--sources=transitive \
|
--sources=transitive \
|
||||||
|
|
Loading…
Reference in New Issue