From 6dc6392ee497591b538efda37c1de8b5ddb8d841 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 5 Sep 2023 17:21:29 -0700 Subject: [PATCH] Static link musl --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c333aa03af..2ed8a1c73b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,9 +70,15 @@ jobs: run: echo "BUILD_CMD=cross" >> $GITHUB_ENV - name: Do release build + if: matrix.target != x86_64-unknown-linux-musl shell: bash run: $BUILD_CMD build --release --target ${{ matrix.target }} + - name: Do release build (musl) + if: matrix.target == x86_64-unknown-linux-musl + shell: bash + run: RUSTFLAGS='-C link-arg=-s' $BUILD_CMD build --release --target ${{ matrix.target }} + - name: Move binary to root of checkout shell: bash run: mv target/${{ matrix.target }}/release/difft difft