summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/prepare-system.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/.gitlab/prepare-system.sh b/.gitlab/prepare-system.sh
index a8eabe2678..4180e6029c 100755
--- a/.gitlab/prepare-system.sh
+++ b/.gitlab/prepare-system.sh
@@ -13,7 +13,24 @@ if [[ -z ${BUILD_SPHINX_HTML:-} ]]; then BUILD_SPHINX_HTML=YES; fi
if [[ -z ${BUILD_SPHINX_PDF:-} ]]; then BUILD_SPHINX_PDF=YES; fi
if [[ -z ${INTEGER_LIBRARY:-} ]]; then INTEGER_LIBRARY=integer-gmp; fi
if [[ -z ${BUILD_FLAVOUR:-} ]]; then BUILD_FLAVOUR=perf; fi
-if [[ -z ${XZ:-} ]]; then XZ=pxz; fi
+
+if [[ -z ${XZ:-} ]]; then
+ if which pxz; then
+ XZ="pxz"
+ elif which xz; then
+ # Check whether --threads is supported
+ if echo "hello" | xz --threads=$CORES >/dev/null; then
+ XZ="xz --threads=$CORES"
+ else
+ XZ="xz"
+ fi
+ else
+ echo "error: neither pxz nor xz were found"
+ exit 1
+ fi
+fi
+echo "Using $XZ for compression..."
+
cat > mk/build.mk <<EOF
V=1