Skip to content

Commit

Permalink
Merge pull request #4383 from benjdero/master
Browse files Browse the repository at this point in the history
Revert "Problem: Libs crash at runtime on Android when built with NDK 23+
  • Loading branch information
bluca committed May 12, 2022
2 parents 2d80502 + 5f6f708 commit 37224c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 2 additions & 8 deletions builds/android/android_build_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,11 @@ function android_build_set_env {
export TOOLCHAIN_ARCH="x86_64"
fi

# Since NDK r23 LLVM is the default
if [ -x "${TOOLCHAIN_PATH}/${TOOLCHAIN_HOST}-ar" ]; then
# Choose a C++ standard library implementation from the ndk
ANDROID_BUILD_CXXSTL="gnustl_shared_49"
fi

# Since NDK r22 the "platforms" dir got removed
if [ -d "${ANDROID_NDK_ROOT}/platforms" ]; then
export ANDROID_BUILD_SYSROOT="${ANDROID_NDK_ROOT}/platforms/android-${MIN_SDK_VERSION}/arch-${TOOLCHAIN_ARCH}"
export ANDROID_BUILD_SYSROOT="${ANDROID_NDK_ROOT}/platforms/android-${MIN_SDK_VERSION}/arch-${TOOLCHAIN_ARCH}"
else
export ANDROID_BUILD_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${HOST_PLATFORM}/sysroot"
export ANDROID_BUILD_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${HOST_PLATFORM}/sysroot"
fi
export ANDROID_BUILD_PREFIX="${ANDROID_BUILD_DIR}/prefix/${TOOLCHAIN_ARCH}"
}
Expand Down
3 changes: 3 additions & 0 deletions builds/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ANDROID_BUILD_DIR="${ANDROID_BUILD_DIR:-`pwd`}"
# Get access to android_build functions and variables
source ./android_build_helper.sh

# Choose a C++ standard library implementation from the ndk
ANDROID_BUILD_CXXSTL="gnustl_shared_49"

BUILD_ARCH=$1
if [ -z $BUILD_ARCH ]; then
usage
Expand Down

0 comments on commit 37224c9

Please sign in to comment.