RFR: 8303796: Optionally build fully statically linked JDK image

Jiangli Zhou jiangli at openjdk.org
Sat Apr 29 00:57:23 UTC 2023


On Fri, 28 Apr 2023 18:25:14 GMT, Phil Race <prr at openjdk.org> wrote:

> Why not ? Surely you aren't statically linking every library you find on the platform that's referenced by JDK ?
> I mean its fine to say that I'd prefer to statically link this library, but I don't understand the claim that this is the only thing that can work ?

It's for providing libzip.a and libfreetype.a as part of the JDK 'static-libs' image. In our usages, I've learned that static linking is preferred whenever possible. We don't statically link libc.

Mine main reasoning/motivation for building and including the libzip.a and libfreetype.a in JDK 'static-libs' image is for ease of use. It reduces complications during the post hermetic image build process, if those libraries are need.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13709#discussion_r1180895872



More information about the client-libs-dev mailing list