From 8280b225276c5d9152e00e7cc280f12f2d0d5d8c Mon Sep 17 00:00:00 2001 From: eval Nya <11857526-nexplorer-3e@users.noreply.gitlab.com> Date: Mon, 8 Jul 2024 19:00:34 +0800 Subject: [PATCH] enhance: enable lto --- packages/openjdk-21/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/openjdk-21/build.sh b/packages/openjdk-21/build.sh index a5ece8c3669cfcb..88e8d753ac837f2 100644 --- a/packages/openjdk-21/build.sh +++ b/packages/openjdk-21/build.sh @@ -14,6 +14,10 @@ TERMUX_PKG_RECOMMENDS="ca-certificates-java, openjdk-21-x, resolv-conf" TERMUX_PKG_SUGGESTS="cups" TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_HAS_DEBUG=false +# currently zgc and shenandoahgc would be auto enabled in server variant, +# while these features is not supported on arm. +# only leave lto here. +__jvm_features="link-time-opt" termux_step_pre_configure() { unset JAVA_HOME @@ -30,6 +34,7 @@ termux_step_configure() { --with-version-pre="" \ --with-version-opt="" \ --with-jvm-variants=server \ + --with-jvm-features="${__jvm_features}" \ --with-debug-level=release \ --openjdk-target=$TERMUX_HOST_PLATFORM \ --with-toolchain-type=clang \