On Tue, 27 Sep 2022 11:30:26 GMT, Doug Simon <dnsi...@openjdk.org> wrote:

> This PR adds a new jlink plugin (`--copy-files=<filenames>`) that copies 
> specified files from the current image into the output image.
> This is useful in the context of GraalVM where libgraal (e.g. 
> `lib/libjvmcicompiler.so`) is produced after the final jlink step in the 
> GraalVM JDK build process. The plugin makes it possible for jlink in a 
> GraalVM JDK to propagate libgraal.
> 
> The advantages of this solution over packaging libgraal as a module are:
> * No need to complicate and slow down the GraalVM JDK build process with an 
> extra jlink step.
> * No need to pay the footprint of libgraal twice in a GraalVM JDK (i.e., once 
> in,`lib/libjvmcicompiler.so` and again in a jmod file).

I can appreciate that this may be going against the design of a modular JDK. 
However, in the context of the possible jlink optimizations you're hinting at, 
jlink can still know about all classes and resources since the CopyFiles plugin 
is limited to copying files that already exist within the source image.
That said, we'll revisit the GraalVM build process and see if we can avoid the 
need for the CopyFiles plugin.

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

PR: https://git.openjdk.org/jdk/pull/10448

Reply via email to