Add custom linker for Android cross-compilation

This commit is contained in:
Jordan Rose 2023-10-13 14:10:05 -07:00 committed by Anthony Ramine
parent 16327cf5c5
commit f82f3fcb0f
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,7 @@ jobs:
rust: stable
os: macos-latest
- thing: arm-android
target: arm-linux-androideabi
target: armv7-linux-androideabi
rust: stable
os: ubuntu-latest
check_only: true
@ -193,6 +193,9 @@ jobs:
- name: Set LIBCLANG_PATH
if: startsWith(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Set Android Linker path
if: endsWith(matrix.thing, '-android')
run: echo "CARGO_TARGET_$(echo ${{ matrix.target }} | tr \\-a-z _A-Z)_LINKER=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/$(echo ${{ matrix.target }} | sed s/armv7/armv7a/)21-clang++" >> "$GITHUB_ENV"
- if: "!matrix.check_only"
run: cargo test --target ${{ matrix.target }} ${{ matrix.extra_test_args }}
name: Run tests