Skip to content

Commit 982650d

Browse files
upx pack final binary only on armeabi-v7a. Segfaults on other ABIs
1 parent 0e245e0 commit 982650d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build_android.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,13 @@ for build_type in $APP/app/.externalNativeBuild/cmake/*; do
8585
abi_string=$(basename ${build_type_and_abi})
8686

8787
FINAL_BINARY=$build_type_and_abi/built/bin/pdf2htmlEX
88-
upx --ultra-brute --8mib-ram $FINAL_BINARY
89-
upx -t $FINAL_BINARY
88+
89+
# UPX only works on armeabi-v7a
90+
# Other ABIs produce segfaults.
91+
if [ "$abi_string" == "armeabi-v7a" ]; then
92+
upx --ultra-brute --8mib-ram $FINAL_BINARY
93+
upx -t $FINAL_BINARY
94+
fi
9095

9196
FINAL_TAR=$build_type_and_abi/${build_type_string}-${abi_string}-pdf2htmlEX.tar
9297
if [ -f "${FINAL_TAR}" ]; then

0 commit comments

Comments
 (0)