On Fri, 5 May 2023 20:43:41 GMT, Erik Joelsson <er...@openjdk.org> wrote:

> Further I would like to suggest that libjvm.a gets put in the variant subdir 
> under lib, just like libjvm.so does today (e.g. `lib/server/libjvm.a`). That 
> way you can support building libjvm.a for all variants without worry. It will 
> also get libjvm.a out of the way to cause less trouble for a graal build that 
> uses the static-libs-bundles as input. This goes against what I suggested 
> before, to just use `JVM_VARIANT_MAIN`, but I think this makes for a cleaner 
> long term solution given the goals of the hermetic java effort.

There are some complications related to `jvm.cfg` and `libjvm.so` path runtime 
handling for JVM variants support, with the JDK traditional/dynamic build. With 
JDK static support, the usage of `libjvm` is fully determined at build time, 
runtime can avoid the complications and associated overhead with accessing 
`jvm.cfg` and determining `libjvm` path. 

At the final static image build time users need to know the sub-directory 
containing `libjvm.a`, if we go with the suggestion. That adds a small 
complication. However, from broader point of view there are probably more 
benefits to do so. I'll change the PR, thanks.

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

PR Comment: https://git.openjdk.org/jdk/pull/13768#issuecomment-1539037862

Reply via email to