forked from mozilla/application-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for the Android x86-64 megazord with Android NDK-25
The new NDK doesn't link to `libgcc` anymore, which breaks our our NSS and SQLCipher libraries since they depended on the symbols from libclang_rt.builtins-x86_64-android` like `__extenddftf2`. See mozilla#5436 for more details. The change works around this by manually linking to the libclang_rt.builtins-x86_64-android library in this case. Added a doc on how to upgrade the Android NDK which hopefully will help us in the future. Extracted some common code from the the `build-*-android.sh` scripts to make these directions simpler.
- Loading branch information
Showing
5 changed files
with
44 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Here's how to upgrade the Android NDK version: | ||
|
||
* Update the version number in: | ||
* `build.gradle` (search for `ndkVersion`) | ||
* `taskcluster/docker/linux/Dockerfile` (search for `ANDROID_NDK_VERSION`) | ||
* `components/support/rc_crypto/nss/nss_build_common/src/lib.rs` (search for `ANDROID_NDK_VERSION`) | ||
* Update these docs by replacing the old version with the new one: | ||
* docs/building.md | ||
* docs/howtos/locally-building-jna.md | ||
* These may need updating if the directory structure changed between this version and the last | ||
* `libs/build-android-common.sh`: ensure the paths to the various binaries are correct. | ||
* `components/support/rc_crypto/nss/nss_build_common/src/lib.rs`: search for | ||
`LINUX_X86_64_LIB_DIR` and ensure this correctly points to the correct lib directory containing | ||
`libclang_rt.builtins-x86_64-android.a`. |
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,17 @@ | ||
#!/bin/bash | ||
# This script is sourced by the `build-*-android.sh` scripts. The shbang above | ||
# is to make shellcheck happy. | ||
|
||
export AR="${TOOLCHAIN_PATH}/bin/llvm-ar" | ||
export CC="${TOOLCHAIN_PATH}/bin/${TOOLCHAIN}${ANDROID_NDK_API_VERSION}-clang" | ||
export CXX="${TOOLCHAIN_PATH}/bin/${TOOLCHAIN}${ANDROID_NDK_API_VERSION}-clang++" | ||
# For 32-bit ARM, the compiler is prefixed with armv7a-linux-androideabi | ||
if [[ "${TOOLCHAIN}" == "arm-linux-androideabi" ]]; then | ||
export CC="${TOOLCHAIN_PATH}/bin/armv7a-linux-androideabi${ANDROID_NDK_API_VERSION}-clang" | ||
export CXX="${TOOLCHAIN_PATH}/bin/armv7a-linux-androideabi${ANDROID_NDK_API_VERSION}-clang++" | ||
fi | ||
export LD="${TOOLCHAIN_PATH}/bin/ld" | ||
export NM="${TOOLCHAIN_PATH}/bin/llvm-nm" | ||
export RANLIB="${TOOLCHAIN_PATH}/bin/llvm-ranlib" | ||
export READELF="${TOOLCHAIN_PATH}/bin/llvm-readelf" | ||
|
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