Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JDK 24] Enable JEP 493 in Temurin 24 builds #4035

Open
jerboaa opened this issue Nov 12, 2024 · 10 comments · May be fixed by #4039
Open

[JDK 24] Enable JEP 493 in Temurin 24 builds #4035

jerboaa opened this issue Nov 12, 2024 · 10 comments · May be fixed by #4039
Assignees
Labels
enhancement Issues that enhance the code or documentation of the repo in any way testing Issues that enhance or fix our test suites

Comments

@jerboaa
Copy link
Contributor

jerboaa commented Nov 12, 2024

Description

JEP 493 has this summary:

Reduce the size of the JDK by approximately 25% by enabling the jlink tool
to create custom run-time images without using the JDK's JMOD files. This
feature must be enabled when the JDK is built; it will not be enabled by
default, and some JDK vendors may choose not to enable it.

Proposal

Add --enable-linkable-runtime to Temurin 24 builds so as to enable this feature. It only affects users running jlink so as to produce custom runtimes. The nice property would be that the Temurin 24 JDK would ship without jmods directory by default. In order to cover cases where a link from the run-time image is not suitable I suggest to also package the jmods image as a separate artefact (like testimage, static-libs and friends) and make those available for each build via the API for users actually needing them.

Pros

By default, the Temurin 24 JDK download shrinks in size without any restrictions in terms of run-time needs. jlink users should be able to use it to link custom runtimes.

Cons

Certain use-cases might not be possible. For example, cross linking, linking from a modified runtime. See JEP 493 for details. For those users there would be the option to download the jmods artefact separately and get the same features as JDK 23+ had.

@jerboaa jerboaa added the enhancement Issues that enhance the code or documentation of the repo in any way label Nov 12, 2024
@github-actions github-actions bot added the testing Issues that enhance or fix our test suites label Nov 12, 2024
@jerboaa jerboaa added PMC-agenda For the PMC to review and removed testing Issues that enhance or fix our test suites labels Nov 12, 2024
@github-actions github-actions bot added the testing Issues that enhance or fix our test suites label Nov 12, 2024
@sxa
Copy link
Member

sxa commented Nov 12, 2024

Test build (locked) with the parameter enabled is at https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk/job/jdk-linux-aarch64-temurin/380 if anyone wants to play

@judovana
Copy link
Contributor

judovana commented Nov 12, 2024

The jmods (like testimage, static-libs and friends) should be also separate rpms subpkg.

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 12, 2024

The jmods (like testimage, static-libs and friends) should be also separate rpms subpkg.

Please file this in https://github.com/adoptium/installer/issues Thanks!

@judovana
Copy link
Contributor

adoptium/installer#1050

@jerboaa jerboaa removed the PMC-agenda For the PMC to review label Nov 13, 2024
@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 13, 2024

Agreed to enable this for JDK 24 at the PMC meeting on Wednesday Nov. 13. For now we won't package the jmods image, which might change if there is user-demand.

@jerboaa jerboaa self-assigned this Nov 13, 2024
@sxa
Copy link
Member

sxa commented Nov 13, 2024

Quick point of note - this is all documented somewhere but we do have multiple options for where such options can be set:

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 13, 2024

Thanks!

jerboaa added a commit to jerboaa/temurin-build that referenced this issue Nov 14, 2024
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
jerboaa added a commit to jerboaa/temurin-build that referenced this issue Nov 14, 2024
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
@jerboaa jerboaa linked a pull request Nov 14, 2024 that will close this issue
jerboaa added a commit to jerboaa/temurin-build that referenced this issue Nov 14, 2024
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
@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 14, 2024

PR enabling this option is here: #4039

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 14, 2024

PR enabling this option is here: #4039

I'm working on added smoke tests for this. Any build with it should have this output in jlink --help

$ ./jdk-24+23/bin/jlink --help | tail -n2
Capabilities:
      Linking from run-time image enabled

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 14, 2024

PR with a smoke test is here: #4040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that enhance the code or documentation of the repo in any way testing Issues that enhance or fix our test suites
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants