From 019b5ab171845b16c3b563341d4a41aa9774013f Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 20 Feb 2023 12:32:37 +0200 Subject: [PATCH] Disable debug info stripping in GraalVM/Mandrel >23.0 Starting with GraalVM/Mandrel 23.0, `native-image` strips debug info in a separate file by default. Quarkus already does this, so for the time being we disable GraalVM/Mandrel's splitting as in contrast to Quarkus it uses absolute paths which makes debugging harder especially for in-container builds. Fixes #31258 --- .../deployment/pkg/steps/NativeImageBuildStep.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index 8da849d81a4d72..55c1f243b51d68 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -712,6 +712,15 @@ public NativeImageInvokerInfo build() { * See https://github.com/quarkusio/quarkus/issues/30772 for more details. */ nativeImageArgs.add("-H:+TrackNodeSourcePosition"); + /* + * Starting with GraalVM/Mandrel 23.0, native-image strips debug info in a separate file by default. + * Quarkus already does this, so for the time being we disable GraalVM/Mandrel's splitting as in + * contrast to Quarkus it uses absolute paths which makes debugging harder especially for + * in-container builds. + * + * See https://github.com/quarkusio/quarkus/issues/31258 + */ + nativeImageArgs.add("-H:-StripDebugInfo"); } /**