From 917ebdf00baf5e020872c32eeadf2e99b8691670 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 23 Mar 2025 23:17:00 +0100 Subject: [PATCH] build: switch back to clang-18 on alpine due to nilsimsa perf regression --- .docker/Dockerfile.alpine | 6 ++++-- .docker/build-linux.sh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.docker/Dockerfile.alpine b/.docker/Dockerfile.alpine index 66e4d645..5d3f6342 100644 --- a/.docker/Dockerfile.alpine +++ b/.docker/Dockerfile.alpine @@ -16,6 +16,8 @@ RUN apk add --no-cache \ RUN apk add --no-cache \ gcc \ g++ \ + clang17 \ + clang18 \ clang19 \ git \ zstd \ @@ -54,6 +56,7 @@ RUN apk add --no-cache \ xz-static \ zstd-dev \ zstd-static \ + xxhash-dev \ lz4-dev \ range-v3-dev \ libxml2-dev \ @@ -80,10 +83,9 @@ RUN wget -O - https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-$(ba RUN pip3 install --break-system-packages --root-user-action ignore mistletoe RUN git config --global --add safe.directory /workspace COPY install-static-libs.sh /usr/local/bin/install-static-libs.sh -RUN bash /usr/local/bin/install-static-libs.sh gcc clang-19 :alpine +RUN bash /usr/local/bin/install-static-libs.sh gcc clang-18 :alpine COPY install-mold.sh /usr/local/bin/install-mold.sh RUN bash /usr/local/bin/install-mold.sh RUN adduser -G users -s bash -u 1000 -D mhx -RUN apk add --no-cache xxhash-dev USER mhx ENTRYPOINT /workspace/.docker/build-linux.sh diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index 68623a75..11b647b2 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -55,9 +55,10 @@ rm -rf build mkdir build cd build +# Stick to clang-18, clang-19 has a regression for nilsimsa performance if [[ "$BUILD_DIST" == "alpine" ]]; then GCC_VERSION= - CLANG_VERSION=-19 + CLANG_VERSION=-18 elif [[ "$BUILD_DIST" == "ubuntu-2204" ]]; then GCC_VERSION=-12 CLANG_VERSION=-15