/graalvm-native-image-options

GraalVM native image options

Primary LanguageKotlinMIT LicenseMIT

GraalVM native-image Options

ko-fi

Parse options of GraalVM native-image to JSON data.

Visit build-native-java-apps.cc to see these options.

GraalVM versions supported:

  • Oracle GraalVM 22.0.1
  • 22.3.3
  • 22.3.2
  • 22.3.0
  • 22.2.0
  • 22.1.0
  • 21.3.0
  • 20.3.4

Options are retrieved using native-image --expert-options-all.

Output content is saved into options-input directory.

JSON output is saved into options-output directory.

Option Format

For each option:

Property Description
type Can be HOSTED or RUNTIME
name Name
dataType Can be BOOLEAN, LONG, DOUBLE, or STRING
defaultValue Default value
description Description

See the example below.

{
  "type": "HOSTED",
  "name": "AOTInline",
  "dataType": "BOOLEAN",
  "defaultValue": true,
  "description": "Perform method inlining in the AOT compiled native image."
}

Use Options

Hosted options are specified using the prefix -H:, while runtimes options are specified using the prefix -R:.

Boolean options are toggled using + or -, while other options are specified using =.

Examples:

Option Description
-H:+AOTInline Enabled hosted option
-R:-Inline Disabled runtime option
-H:Class=Main Hosted option
-R:MaximumHeapSizePercent=80 Runtime option