Skip to content

Commit aa3791f

Browse files
authored
Add --enable-linkable-runtime for JDK 24+ (#4039)
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 #4035
1 parent 78a484c commit aa3791f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sbin/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,17 @@ configureMacOSCodesignParameter() {
174174
fi
175175
}
176176

177+
# JDK 24+ includes JEP 493 which allows for the JDK to enable
178+
# linking from the run-time image (instead of only from JMODs). Enable
179+
# this option. This has the effect, that no 'jmods' directory will be
180+
# produced in the resulting build. Thus, the tarball and, especially the
181+
# extracted tarball will be smaller in terms of disk space size.
182+
configureLinkableRuntimeParameter() {
183+
if [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 24 ]]; then
184+
addConfigureArg "--enable-linkable-runtime" ""
185+
fi
186+
}
187+
177188
# Get the OpenJDK update version and build version
178189
getOpenJDKUpdateAndBuildVersion() {
179190
cd "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}"
@@ -574,6 +585,7 @@ configureCommandParameters() {
574585
configureVersionStringParameter
575586
configureBootJDKConfigureParameter
576587
configureDevKitConfigureParameter
588+
configureLinkableRuntimeParameter
577589
configureShenandoahBuildParameter
578590
configureMacOSCodesignParameter
579591
configureDebugParameters

0 commit comments

Comments
 (0)