Skip to content

Commit

Permalink
Replace native-image -H: options with their -- equivalents
Browse files Browse the repository at this point in the history
`-H:` options are considered non-public and should thus be avoided as
they can change without notice.
  • Loading branch information
zakkak committed Sep 7, 2022
1 parent f8954be commit cae02c9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ public NativeImageInvokerInfo build() {
} else {
//Default: be strict as those fallback images aren't very useful
//and tend to cover up real problems.
nativeImageArgs.add("-H:FallbackThreshold=0");
nativeImageArgs.add("--no-fallback");
}

// 22.1 removes --allow-incomplete-classpath and makes it the default. --link-at-build-time is now
Expand All @@ -757,7 +757,7 @@ public NativeImageInvokerInfo build() {
}

if (nativeConfig.reportErrorsAtRuntime) {
nativeImageArgs.add("-H:+ReportUnsupportedElementsAtRuntime");
nativeImageArgs.add("--report-unsupported-elements-at-runtime");
}
if (nativeConfig.reportExceptionStackTraces) {
nativeImageArgs.add("-H:+ReportExceptionStackTraces");
Expand Down Expand Up @@ -796,7 +796,7 @@ public NativeImageInvokerInfo build() {
nativeImageArgs.add("-H:-AddAllCharsets");
}
if (!protocols.isEmpty()) {
nativeImageArgs.add("-H:EnableURLProtocols=" + String.join(",", protocols));
nativeImageArgs.add("--enable-url-protocols=" + String.join(",", protocols));
}
if (!inlineBeforeAnalysis) {
nativeImageArgs.add("-H:-InlineBeforeAnalysis");
Expand Down

0 comments on commit cae02c9

Please sign in to comment.