mirror of
https://github.com/servo/servo.git
synced 2025-09-10 15:08:21 +01:00
Support for Android arm64 compilations
This commit is contained in:
parent
42e551f606
commit
48fb715941
8 changed files with 66 additions and 43 deletions
|
@ -80,7 +80,7 @@ fn android_main() {
|
|||
}
|
||||
|
||||
// compiling libandroid_native_app_glue.a
|
||||
if Command::new(toolchain_path.join("bin").join("arm-linux-androideabi-ar"))
|
||||
if Command::new(toolchain_path.join("bin").join(format!("{}-ar", toolchain)))
|
||||
.arg("rcs")
|
||||
.arg(directory.join("libandroid_native_app_glue.a"))
|
||||
.arg(directory.join("android_native_app_glue.o"))
|
||||
|
|
|
@ -11,4 +11,4 @@ set -o pipefail
|
|||
source fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi-4.9" "android-18" "armeabi"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi"
|
||||
|
|
|
@ -11,4 +11,4 @@ set -o pipefail
|
|||
source fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm64" "aarch64-linux-android-4.9" "android-21" "arm64-v8a"
|
||||
call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a"
|
||||
|
|
|
@ -11,4 +11,4 @@ set -o pipefail
|
|||
source fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi-4.9" "android-18" "armeabi-v7a"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi-v7a"
|
||||
|
|
|
@ -18,8 +18,8 @@ call_gcc()
|
|||
export ANDROID_SYSROOT="${ANDROID_NDK}/platforms/${_ANDROID_PLATFORM}/${_ANDROID_ARCH}"
|
||||
ANDROID_TOOLCHAIN=""
|
||||
for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86"; do
|
||||
if [[ -d "${ANDROID_NDK}/toolchains/${_ANDROID_EABI}/prebuilt/${host}/bin" ]]; then
|
||||
ANDROID_TOOLCHAIN="${ANDROID_NDK}/toolchains/${_ANDROID_EABI}/prebuilt/${host}/bin"
|
||||
if [[ -d "${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin" ]]; then
|
||||
ANDROID_TOOLCHAIN="${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@ -32,7 +32,7 @@ call_gcc()
|
|||
echo "sysroot: ${ANDROID_SYSROOT}"
|
||||
echo "targetdir: ${ANDROID_CXX_LIBS}"
|
||||
|
||||
"${ANDROID_TOOLCHAIN}/arm-linux-androideabi-gcc" \
|
||||
"${ANDROID_TOOLCHAIN}/${_ANDROID_EABI}-gcc" \
|
||||
--sysroot="${ANDROID_SYSROOT}" -L "${ANDROID_CXX_LIBS}" ${_GCC_PARAMS} -lc++ \
|
||||
-o "${TARGET_DIR}/libservo.so" -shared && touch "${TARGET_DIR}/servo"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue