Skip to content

Commit 0dc7bb8

Browse files
committed
fix: use correct strip tool for ARM cross-compilation
Use aarch64-linux-gnu-strip for ARM Linux builds instead of regular strip command, which cannot recognize ARM binary format. Fixes GitHub Actions release workflow for aarch64-unknown-linux-gnu target. Error: strip: Unable to recognise the format of the input file Solution: Use target-specific strip tool
1 parent 56681af commit 0dc7bb8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ jobs:
7777

7878
- name: Strip binary (Unix)
7979
if: matrix.os != 'windows-latest'
80-
run: strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
80+
run: |
81+
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
82+
aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
83+
else
84+
strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
85+
fi
8186
8287
- name: Package binaries (Unix)
8388
if: matrix.os != 'windows-latest'

0 commit comments

Comments
 (0)