diff --git a/removejdkdebuginfo.sh b/removejdkdebuginfo.sh index 931b88a7..1f7e2d8e 100755 --- a/removejdkdebuginfo.sh +++ b/removejdkdebuginfo.sh @@ -28,11 +28,17 @@ if [[ "$TARGET_JDK" == "aarch64" ]] || [[ "$TARGET_JDK" == "x86_64" ]]; then fi # Produce the jre equivalent from the jdk (https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/) +if [[ "$BUILD_IOS" != "1" ]]; then + export JLINK_STRIP_ARG="--strip-native-debug-symbols=exclude-debuginfo-files:objcopy=${OBJCOPY}" +else + export JLINK_STRIP_ARG="--strip-debug" +fi + jlink \ --module-path=jdkout/jmods \ --add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.jdwp.agent,jdk.jfr,jdk.jsobject,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.xml.dom,jdk.zipfs$EXTRA_JLINK_OPTION \ --output jreout \ ---strip-native-debug-symbols=exclude-debuginfo-files:objcopy=${OBJCOPY} \ +$JLINK_STRIP_ARG \ --no-man-pages \ --no-header-files \ --release-info=jdkout/release \