Skip to content

Commit

Permalink
Merge pull request #44092 from Karm/issue-44001
Browse files Browse the repository at this point in the history
[native-image] Adds -H:+ForeignAPISupport for all GraalVM 24.2+
  • Loading branch information
zakkak authored Oct 30, 2024
2 parents 10f5926 + 42d7a13 commit 45dbff7
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,16 @@ public NativeImageInvokerInfo build() {

addExperimentalVMOption(nativeImageArgs, "-H:+AllowFoldMethods");

/*
* Foreign Function and Memory API in Native Image, JDK's JEP 454
* This is needed for JDK 24+ internal native calls due to AWT,
* e.g. JDK-8337237 et al.
*
*/
if (graalVMVersion.compareTo(GraalVM.Version.VERSION_24_2_0) >= 0) {
addExperimentalVMOption(nativeImageArgs, "-H:+ForeignAPISupport");
}

if (nativeConfig.headless()) {
nativeImageArgs.add("-J-Djava.awt.headless=true");
}
Expand Down

0 comments on commit 45dbff7

Please sign in to comment.