Skip to content

Commit 9408aea

Browse files
add workaround for building ring on aarch64
Signed-off-by: Andrew Whitehead <[email protected]>
1 parent e534362 commit 9408aea

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/build.yml

+10
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ jobs:
164164
run: |
165165
if [ -n "${{ matrix.use_cross }}" ]; then
166166
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
167+
# Required for compatibility with manylinux2014.
168+
# https://github.com/briansmith/ring/issues/1728
169+
if [ "${{ matrix.architecture }}" = "linux-aarch64" ]; then
170+
export CFLAGS="-D__ARM_ARCH=8"
171+
fi
167172
cross build --lib --release --target ${{ matrix.target }}
168173
elif [ "${{ matrix.architecture }}" == "darwin-universal" ]; then
169174
./build-universal.sh
@@ -427,6 +432,11 @@ jobs:
427432
- name: Build
428433
run: |
429434
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
435+
# Required for compatibility with manylinux2014:
436+
# https://github.com/briansmith/ring/issues/1728
437+
if [ "${{ matrix.target }}" = "aarch64-linux-android" ]; then
438+
export CFLAGS="-D__ARM_ARCH=8"
439+
fi
430440
cross build --lib --release --target ${{matrix.target}}
431441
432442
- name: Upload artifacts

Cross.toml

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[build.env]
2+
passthrough = ["CFLAGS"]
3+
14
[target.aarch64-unknown-linux-gnu]
25
image = "ghcr.io/rust-cross/manylinux2014-cross:aarch64"
36

0 commit comments

Comments
 (0)