Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit b221787

Browse files
Feat: Reduce JRE 8 size by around 3 MB (#15)
* Feat: trim .so files * Build: update ndk version * workaround, Switch to old strip bins * Fix:typo
1 parent 58b97dd commit b221787

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

ci_build_arch_aarch32.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33

44
export TARGET=arm-linux-androideabi
55
export TARGET_JDK=arm
6+
export NDK_PREBUILT_ARCH=/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/strip
67

78
bash ci_build_global.sh
89

ci_build_arch_aarch64.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ else
66
export TARGET=aarch64-linux-android
77
fi
88
export TARGET_JDK=aarch64
9+
export NDK_PREBUILT_ARCH=/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/aarch64-linux-android/bin/strip
910

1011
bash ci_build_global.sh
1112

ci_build_arch_x86.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33

44
export TARGET=i686-linux-android
55
export TARGET_JDK=x86
6+
export NDK_PREBUILT_ARCH=/toolchains/x86-4.9/prebuilt/linux-x86_64/i686-linux-android/bin/strip
67

78
bash ci_build_global.sh
89

ci_build_arch_x86_64.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33

44
export TARGET=x86_64-linux-android
55
export TARGET_JDK=x86_64
6+
export NDK_PREBUILT_ARCH=/toolchains/x86_64-4.9/prebuilt/linux-x86_64/x86_64-linux-android/bin/strip
67

78
bash ci_build_global.sh
89

tarjdk.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ sudo cp -R jre_override/lib/* jreout/lib/
3030
sudo cp -R jre_override/lib/* jdkout/jre/lib
3131

3232
cd jreout
33+
34+
# Strip in place all .so files thanks to the ndk
35+
find ./ -name '*.so' -execdir ${NDK}${NDK_PREBUILT_ARCH} {} \;
36+
3337
tar cJf ../jre8-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
3438

3539
cd ../jdkout

0 commit comments

Comments
 (0)