RFR: 8303796: Optionally build fully statically linked JDK image

Alan Bateman alanb at openjdk.org
Sun Apr 30 18:47:53 UTC 2023


On Fri, 28 Apr 2023 18:14:48 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The build is already capable of producing .a files and this patch is building on top of that build feature. The current .a file creation is used by the downstream graal build which needs it for nativeimage.

Also builds on recent changes to remove duplicate symbol names. It's good that the PR demonstrates that these can be linked to create "javastatic" but having it copy into the run-time image created by jlink is probably not the eventual outcome.

A possible direction on this is for the build to create a set of packaged modules with the .a files, then have an alternative image builder in jlink that integrates with the native linker. Combined with other parts in Jiangli's slides/proposal, it would mean that jlink could produce a single executable that would work for both the JDK or any set of modules.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13709#issuecomment-1529110628



More information about the client-libs-dev mailing list