Skip to content

Commit

Permalink
Add --enable-linkable-runtime for JDK 24+
Browse files Browse the repository at this point in the history
For JDK's including JEP 493, enable the build option
for producing a jlink that is capable of linking from
the run-time image.

Closes adoptium#4035
  • Loading branch information
jerboaa committed Nov 14, 2024
1 parent bb37842 commit 31eb713
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ configureMacOSCodesignParameter() {
fi
}

# JDK 24+ includes JEP 493 which allows for the JDK to enable
# linking from the run-time image (instead of only from JMODs). Enable
# this option. This has the effect, that no 'jmods' directory will be
# produced in the resulting build. Thus, the tarball and, especially the
# extracted tarball will be smaller in terms of disk space size.
configureLinkableRuntimeParameter() {
if [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 24 ]]; then
addConfigureArg "--enable-linkable-runtime" ""
fi
}

# Get the OpenJDK update version and build version
getOpenJDKUpdateAndBuildVersion() {
cd "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"
Expand Down Expand Up @@ -574,6 +585,7 @@ configureCommandParameters() {
configureVersionStringParameter
configureBootJDKConfigureParameter
configureDevKitConfigureParameter
configureLinkableRuntimeParameter
configureShenandoahBuildParameter
configureMacOSCodesignParameter
configureDebugParameters
Expand Down

0 comments on commit 31eb713

Please sign in to comment.