mirror of
https://github.com/servo/servo.git
synced 2025-09-02 11:08:22 +01:00
Auto merge of #17099 - MortimerGoro:android_arm64, r=larsbergstrom
Support for Android arm64 compilations <!-- Please describe your changes on the following line: --> This PR is the final step to adds support for Android arm64 compilations. See https://github.com/servo/servo/issues/11921 for previous work. Fixes in this PR: - Fix js dependency compilation: https://github.com/servo/rust-mozjs/pull/360 - Fix skia dependency link error: https://github.com/servo/skia/pull/136 - Fix blurdroid dependency compilation: https://github.com/szeged/blurdroid/pull/4 - Fix mio and net2 dependency compilations: https://github.com/carllerche/mio/pull/599 - Fix gcc compiler name in the fake linker - Compile OpenSSL for aarch64 (update to stable 1.1.0 was required for this) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17099) <!-- Reviewable:end -->
This commit is contained in:
commit
85e5551ee9
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