From c8453e87599fe66f4d18d901bc9dc431306afa2d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 21 May 2018 20:58:36 +0100 Subject: [PATCH] make.sh: Use all processor cores for compression Signed-off-by: Michael Tremer --- make.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 62708abd66..d7f56f293a 100755 --- a/make.sh +++ b/make.sh @@ -866,8 +866,9 @@ if [ ${HOST_MEM} -lt 1024 ]; then exiterror "You will need more than 1GB or host memory to run the build" fi +# We compress archives with "xz -8", using all cores and up to 70% of memory XZ_MEM="$(( HOST_MEM * 7 / 10 ))MiB" -XZ_OPT="-T4 -8 --memory=$XZ_MEM" +XZ_OPT="-T$(system_processors) -8 --memory=${XZ_MEM}" if [ -n "${BUILD_ARCH}" ]; then configure_build "${BUILD_ARCH}" -- 2.39.2