@@ -64,12 +64,20 @@ jobs:
6464 - uses : actions/setup-python@v5
6565 with :
6666 python-version : " 3.12"
67+ - name : Workaround ring ARM asm macro in cross builds
68+ if : matrix.platform.target == 'aarch64' || matrix.platform.target == 'armv7'
69+ run : |
70+ if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
71+ echo "CFLAGS_aarch64_unknown_linux_gnu=-D__ARM_ARCH=8" >> "$GITHUB_ENV"
72+ else
73+ echo "CFLAGS_armv7_unknown_linux_gnueabihf=-D__ARM_ARCH=7" >> "$GITHUB_ENV"
74+ fi
6775 - name : Build wheels
6876 uses : PyO3/maturin-action@v1
6977 with :
7078 target : ${{ matrix.platform.target }}
7179 args : --release --out dist --find-interpreter
72- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
80+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') && matrix.platform.target != 'aarch64' && matrix.platform.target != 'armv7' }}
7381 manylinux : auto
7482 - name : Upload wheels
7583 uses : actions/upload-artifact@v4
@@ -100,12 +108,20 @@ jobs:
100108 - uses : actions/setup-python@v5
101109 with :
102110 python-version : " 3.12"
111+ - name : Workaround ring ARM asm macro in cross builds
112+ if : matrix.platform.target == 'aarch64' || matrix.platform.target == 'armv7'
113+ run : |
114+ if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
115+ echo "CFLAGS_aarch64_unknown_linux_musl=-D__ARM_ARCH=8" >> "$GITHUB_ENV"
116+ else
117+ echo "CFLAGS_armv7_unknown_linux_musleabihf=-D__ARM_ARCH=7" >> "$GITHUB_ENV"
118+ fi
103119 - name : Build wheels
104120 uses : PyO3/maturin-action@v1
105121 with :
106122 target : ${{ matrix.platform.target }}
107123 args : --release --out dist --find-interpreter
108- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
124+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') && matrix.platform.target != 'aarch64' && matrix.platform.target != 'armv7' }}
109125 manylinux : musllinux_1_2
110126 - name : Upload wheels
111127 uses : actions/upload-artifact@v4
0 commit comments