Skip to content

Commit dcf1419

Browse files
committed
Fix crash issue for API < 21
Summary: New NDK seems not define __ANDROID_API__ so that `sigfillset` does not go for fallback path and crash. Define __ANDROID_API__ explicitly to fix the issue.
1 parent a086da4 commit dcf1419

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

scripts/.tests.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export ANDROID_SDK_BUILD_API_LEVEL="28"
1010
# Google APIs for Android level
1111
export ANDROID_GOOGLE_API_LEVEL="23"
1212
# Minimum Android API Level we target
13-
export ANDROID_SDK_TARGET_API_LEVEL="21"
13+
export ANDROID_SDK_TARGET_API_LEVEL="16"
1414
# Android Virtual Device name
1515
export AVD_NAME="testAVD"
1616
# ABI to use in Android Virtual Device

scripts/compile/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ $FRAME_POINTER_FLAG \
149149
-DCUSTOMIZE_REACT_NATIVE \
150150
$SWITCH_COMMON_CFLAGS_INTL \
151151
$CFLAGS_BUILD_TYPE \
152+
-D__ANDROID_API__=${ANDROID_API} \
152153
"
153154

154155
COMMON_CXXFLAGS=" \

scripts/compile/jsc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $TARGETDIR/webkit/Tools/Scripts/build-webkit \
6565
--no-tools \
6666
--cmakeargs="-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
6767
-DANDROID_ABI=${JNI_ARCH} \
68-
-DANDROID_NATIVE_API_LEVEL=${ANDROID_API} \
68+
-DANDROID_PLATFORM=${ANDROID_API} \
6969
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
7070
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
7171
-DICU_ROOT=${TARGETDIR}/icu/${CROSS_COMPILE_PLATFORM}-${FLAVOR}/prebuilts \

0 commit comments

Comments
 (0)