forked from cross-rs/cross
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add android runner to run android binaries.
Android binaries currently fail to run, because `libc++_shared.so` is not found, so ensure the library is preloaded via `LD_PRELOAD`. This creates a simple `android-runner` file, so any additional changes can be added there. Linked Issues: cross-rs#82
- Loading branch information
1 parent
2f24bd4
commit 62c9f89
Showing
6 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# arch in the rust target | ||
arch="${1}" | ||
shift | ||
|
||
# select android abi, and find the shared libc++ library | ||
android_abi="${arch}-linux-android" | ||
qarch="${arch}" | ||
case "${arch}" in | ||
arm) | ||
android_abi="arm-linux-androideabi" | ||
;; | ||
i686) | ||
qarch="i386" | ||
;; | ||
esac | ||
libdir="/android-ndk/sysroot/usr/lib/${android_abi}" | ||
|
||
LD_PRELOAD="${libdir}/libc++_shared.so" exec qemu-"${qarch}" "${@}" |