mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-09-10 12:47:00 -04:00
Feat: strip binaries
This commit is contained in:
parent
bb2e8a7bba
commit
ddbc843bbc
@ -92,15 +92,15 @@ fi
|
|||||||
|
|
||||||
bash ./configure \
|
bash ./configure \
|
||||||
--openjdk-target=$TARGET \
|
--openjdk-target=$TARGET \
|
||||||
--with-extra-cflags=" -flto $CFLAGS" \
|
--with-extra-cflags="$CFLAGS" \
|
||||||
--with-extra-cxxflags=" -flto $CFLAGS" \
|
--with-extra-cxxflags="$CFLAGS" \
|
||||||
--with-extra-ldflags=" -flto $LDFLAGS" \
|
--with-extra-ldflags="$LDFLAGS" \
|
||||||
--disable-precompiled-headers \
|
--disable-precompiled-headers \
|
||||||
--disable-warnings-as-errors \
|
--disable-warnings-as-errors \
|
||||||
--enable-option-checking=fatal \
|
--enable-option-checking=fatal \
|
||||||
--enable-headless-only=yes \
|
--enable-headless-only=yes \
|
||||||
--with-jvm-variants=$JVM_VARIANTS \
|
--with-jvm-variants=$JVM_VARIANTS \
|
||||||
--with-jvm-features=-dtrace,-zero,-vm-structs,-epsilongc,link-time-opt \
|
--with-jvm-features=-dtrace,-zero,-vm-structs,-epsilongc \
|
||||||
--with-cups-include=$CUPS_DIR \
|
--with-cups-include=$CUPS_DIR \
|
||||||
--with-devkit=$TOOLCHAIN \
|
--with-devkit=$TOOLCHAIN \
|
||||||
--with-debug-level=$JDK_DEBUG_LEVEL \
|
--with-debug-level=$JDK_DEBUG_LEVEL \
|
||||||
|
13
repackjre.sh
13
repackjre.sh
@ -18,7 +18,7 @@ mkdir -p $work1
|
|||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
|
|
||||||
# here comes a not-so-complicated functions to easily make desired arch
|
# here comes a not-so-complicated functions to easily make desired arch
|
||||||
## Usage: makearch [jre_libs_dir_name] [name_in_tarball]
|
## Usage: makearch [jre_libs_dir_name] [name_in_tarball] [name of prebuilt tool]
|
||||||
makearch () {
|
makearch () {
|
||||||
echo "Making $2...";
|
echo "Making $2...";
|
||||||
cd "$work";
|
cd "$work";
|
||||||
@ -37,6 +37,9 @@ makearch () {
|
|||||||
|
|
||||||
mv release "$work1"/release
|
mv release "$work1"/release
|
||||||
|
|
||||||
|
# Strip in place all .so files thanks to the ndk
|
||||||
|
find "$work1" -name '.*so' -execdir "$NDK/toolchains/llvm/prebuilt/linux-x86_64/$3-linux-android/bin/strip" {}
|
||||||
|
|
||||||
XZ_OPT="-6 --threads=0" tar cJf bin-$2.tar.xz -C "$work1" . > /dev/null;
|
XZ_OPT="-6 --threads=0" tar cJf bin-$2.tar.xz -C "$work1" . > /dev/null;
|
||||||
mv bin-$2.tar.xz "$out"/;
|
mv bin-$2.tar.xz "$out"/;
|
||||||
rm -rf "$work"/*;
|
rm -rf "$work"/*;
|
||||||
@ -62,10 +65,10 @@ makeuni () {
|
|||||||
|
|
||||||
# now time to use them!
|
# now time to use them!
|
||||||
makeuni
|
makeuni
|
||||||
makearch aarch32 arm
|
makearch aarch32 arm arm
|
||||||
makearch aarch64 arm64
|
makearch aarch64 arm64 aarch64
|
||||||
makearch i386 x86
|
makearch i386 x86 i686
|
||||||
makearch amd64 x86_64
|
makearch amd64 x86_64 x86_64
|
||||||
|
|
||||||
# if running under GitHub Actions, write commit sha, else formatted system date
|
# if running under GitHub Actions, write commit sha, else formatted system date
|
||||||
if [ -n "$GITHUB_SHA" ]
|
if [ -n "$GITHUB_SHA" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user