Skip to content

Commit

Permalink
Fix iOS build (jlink strip arg)
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 authored Apr 15, 2024
1 parent 78148b6 commit 4e81482
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion removejdkdebuginfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 4e81482

Please sign in to comment.