Skip to content

Commit 3e4ac4c

Browse files
authored
Merge pull request #14 from openSVM/copilot/fix-13
Add Android cross-compilation support with NDK configuration
2 parents 8fecbe8 + 5ab1224 commit 3e4ac4c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
# When using LTO (Link Time Optimization), avoid setting embed-bitcode=no
88
# in rustflags as Cargo may automatically add it for certain targets.
99
# Use profile-specific settings instead for better compatibility.
10+
11+
[target.aarch64-linux-android]
12+
linker = "aarch64-linux-android21-clang"

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,15 @@ jobs:
357357
- name: Install Android SDK
358358
uses: android-actions/setup-android@v3
359359

360+
- name: Setup Android NDK
361+
run: |
362+
# Install Android NDK
363+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;25.0.8775105"
364+
365+
# Set environment variables for Android NDK
366+
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.0.8775105" >> $GITHUB_ENV
367+
echo "$ANDROID_HOME/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
368+
360369
- name: Cache dependencies
361370
uses: actions/cache@v4
362371
with:

0 commit comments

Comments
 (0)