Skip to content

Graal Native Image '-H:Name' option should be replaced by '-o' #1691

@AlanBurlison

Description

@AlanBurlison

I'm seeing the following warning from Graal Native Image builds:

[info] Warning: The option '-H:Name=command' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.

and:

[info] ------------------------------------------------------------------------------------------------------------------------
[info]  1 experimental option(s) unlocked:
[info]  - '-H:Name' (alternative API option(s): -o periscope; origin(s): command line)
[info] ------------------------------------------------------------------------------------------------------------------------

From https://www.graalvm.org/latest/reference-manual/native-image/overview/Options/

-o: name of the output file to be generated

The fix is trivial:

src/main/scala/com/typesafe/sbt/packager/graalvmnativeimage/GraalVMNativeImagePlugin.scala

166 s"-H:Name=$binaryName"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions