Repository navigation
Dist: dump the base CDS archive when the copied JDK has none (fixes master on macOS x64) - #1390
Merged
Merged
Conversation
The macOS distribution copies the JDK instead of running jlink, and assumed that it brings classes.jsa. The Temurin for macOS x64 on CI has none, so assembleSlimCompilerDist failed on macos-15-intel after #1386 (macos-latest, arm64, has one). The task now dumps the archive with java -Xshare:dump when the copied runtime has none, and then starts the runtime with -Xshare:on, which fails without a usable archive, instead of looking for a file name. The JVMs run without JAVA_TOOL_OPTIONS and its siblings: an archive takes on the options of the JVM which writes it, and CI exports -XX:+UseCompactObjectHeaders.
…in this pull request (remove before merge)
Frotty
marked this pull request as ready for review
October 8, 2026 13:20
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Master's CI fails on
macos-15-intelsince #1386:assembleSlimCompilerDistthrows "The runtime has no base CDS archive". The macOS distribution copies the JDK instead of running jlink, and #1386 assumed the copy bringsclasses.jsa. The Temurin 25 thatsetup-javainstalls on the Intel runner has none (macos-latest, arm64, has one and passed). Run: https://github.com/wurstscript/WurstScript/actions/runs/37778085905 (jobGradle build on macos-15-intel).assembleSlimCompilerDistdumps the archive withjava -Xshare:dumpwhen the copied runtime has none, so the runtime always has one.-Xshare:on, which fails without a usable archive, instead of looking for a file name (a file in the wrong mode passes a name check and does nothing).JAVA_TOOL_OPTIONS,_JAVA_OPTIONSandJDK_JAVA_OPTIONS: an archive takes on the options of the JVM that writes it, and CI exports-XX:+UseCompactObjectHeaders.Why master broke unnoticed
Pull-request CI runs one Linux job and does not package (
Package slim runtimeruns on pushes only), so #1386 was never packaged on macOS before it merged. To test this change where it matters I ran a temporary workflow in this pull request (packaging onmacos-15-intel,macos-latestand Windows with CI'sJAVA_TOOL_OPTIONS; run 37783008340, since removed). Whether packaging should run on pull requests which touchdeploy.gradleorlaunchers/is a call for the maintainers.Checks
macOS and Windows, on CI (the temporary workflow, with CI's
JAVA_TOOL_OPTIONS;packageSlimCompilerDistsucceeded on all three):macos-15-intel: the JDK'slib/serverholds onlylibjsig.dylibandlibjvm.dylib(Temurin 25.0.4+101.0). The distribution has a 15.6 MBclasses.jsaafter the build, andjava -Xshare:on -version(withoutJAVA_TOOL_OPTIONS) starts with "sharing".macos-latest(arm64) andwindows-latest: pass.Windows, local:
assembleSlimCompilerDistbuilds;bin/serverhasclasses.jsa.-x jlinkRuntime25(the full-JDK case): "The runtime has no base CDS archive, dumping it", the guard passes.JAVA_TOOL_OPTIONSset the archive is still the default-modeclasses.jsa(notclasses_coh.jsa).Not run: Linux packaging (unchanged path: jlink makes the archive; master's push run for #1386 passed on
ubuntu-latest).