RFR: 7903720: Change layout of jextract image

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Apr 30 15:00:19 UTC 2024


On Tue, 30 Apr 2024 14:49:25 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> See JBS issue for problem description.
> 
> This patch changes the layout of the jextract image we produce. The new image has the 2 launcher scripts in the root of the image, with a nested `runtime` folder containing the jlink runtime image.
> 
> I've added both launcher scripts to the repo under the `src/main` directory, and they are copied to the image during the build. The script is somewhat simplified by removing a blank variable that was not being used. I also took the opportunity to address an issue with the windows launcher script turning off `echo`. Instead it now avoids output using the `@` prefix for each command in the script.
> 
> I've tested that the scripts work (using `jextract --help`) on both Linux and Windows.

Marked as reviewed by mcimadamore (Reviewer).

src/main/jextract line 3:

> 1: #!/bin/sh
> 2: DIR=`dirname $0`
> 3: $DIR/runtime/bin/java -m org.openjdk.jextract/org.openjdk.jextract.JextractTool "$@"

What do you think about adding a dependency on some shell variable (e.g. JEXTRACT_JAVA_OPTIONS) to pass extra arguments to jextract's JVM? I recall reaching for something like this e.g. to enable debug mode? (But, totally optional, more asking for an opinion)

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

PR Review: https://git.openjdk.org/jextract/pull/241#pullrequestreview-2031643253
PR Review Comment: https://git.openjdk.org/jextract/pull/241#discussion_r1584981216


More information about the jextract-dev mailing list