Skip to content

Commit

Permalink
Instruct GraalVM / Mandrel to keep more accurate debug information
Browse files Browse the repository at this point in the history
Instruct GraalVM / Mandrel to keep more accurate debug information about
source locations when generating debug info for debugging and monitoring
tools. This parameter may break compatibility with Truffle.  Affected
users should explicitly pass `-H:-TrackNodeSourcePosition` through
`quarkus.native.additional-build-args` to override it.

Closes: quarkusio#30772
  • Loading branch information
zakkak committed Feb 7, 2023
1 parent 67c66d3 commit 0e308ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static final class Version implements Comparable<Version> {
static final Version VERSION_21_3_0 = new Version("GraalVM 21.3.0", "21.3.0", Distribution.ORACLE);
public static final Version VERSION_22_3_0 = new Version("GraalVM 22.3.0", "22.3.0", Distribution.ORACLE);
public static final Version VERSION_22_2_0 = new Version("GraalVM 22.2.0", "22.2.0", Distribution.ORACLE);
public static final Version VERSION_23_0_0 = new Version("GraalVM 23.0.0", "23.0.0", Distribution.ORACLE);

public static final Version MINIMUM = VERSION_22_2_0;
public static final Version CURRENT = VERSION_22_3_0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,18 @@ public NativeImageInvokerInfo build() {
nativeImageArgs.add("-H:-ParseOnce");
}

if (nativeConfig.debug.enabled && graalVMVersion.isNewerThan(GraalVM.Version.VERSION_23_0_0)) {
/*
* Instruct GraalVM / Mandrel to keep more accurate information about source locations when generating
* debug info for debugging and monitoring tools. This parameter may break compatibility with Truffle.
* Affected users should explicitly pass {@code -H:-TrackNodeSourcePosition} through
* {@code quarkus.native.additional-build-args} to override it.
*
* See https://github.com/quarkusio/quarkus/issues/30772 for more details.
*/
nativeImageArgs.add("-H:+TrackNodeSourcePosition");
}

/**
* This makes sure the Kerberos integration module is made available in case any library
* refers to it (e.g. the PostgreSQL JDBC requires it, seems plausible that many others will as well):
Expand Down

0 comments on commit 0e308ec

Please sign in to comment.