summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml5
-rwxr-xr-x.gitlab/prepare-system.sh13
2 files changed, 9 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d772299a3c..3ae43784ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -639,8 +639,6 @@ validate-x86_64-linux-deb9-dwarf:
variables:
TEST_ENV: "x86_64-linux-deb10"
BIN_DIST_PREP_TAR_COMP: "./ghc-x86_64-deb10-linux.tar.xz"
- # pxz doesn't exist; it's xz --threads
- XZ: "xz --threads=$CORES"
cache:
key: linux-x86_64-deb10
@@ -705,7 +703,6 @@ release-x86_64-linux-deb8:
BUILD_SPHINX_PDF: "NO"
TEST_ENV: "x86_64-linux-alpine"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-alpine-linux.tar.xz"
- XZ: "xz --threads=$CORES"
# Can't use ld.gold due to #13958.
CONFIGURE_ARGS: "--disable-ld-override"
cache:
@@ -738,8 +735,6 @@ nightly-x86_64-linux-alpine:
BUILD_SPHINX_PDF: "NO"
TEST_ENV: "x86_64-linux-centos7"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-centos7-linux.tar.xz"
- # pxz is not available on centos7 for reasons I can't understand
- XZ: "xz"
# CentOS seems to default to ascii
LANG: "en_US.UTF-8"
cache:
diff --git a/.gitlab/prepare-system.sh b/.gitlab/prepare-system.sh
index 585f0042d4..4180e6029c 100755
--- a/.gitlab/prepare-system.sh
+++ b/.gitlab/prepare-system.sh
@@ -13,18 +13,23 @@ 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
+ XZ="pxz"
elif which xz; then
- XZ=xz
+ # 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: pxz nor xz were found"
+ echo "error: neither pxz nor xz were found"
exit 1
fi
fi
+echo "Using $XZ for compression..."
cat > mk/build.mk <<EOF