RFR: 8375241: Simplify --with-native-debug-symbols-level option implementation

Julian Waters jwaters at openjdk.org
Wed Jan 14 11:45:13 UTC 2026


On Wed, 14 Jan 2026 10:38:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> --with-native-debug-symbols-level was added some time ago to allow selecting the level of debugging information created for compiled binaries. The UTIL_ARG_WITH utility that the option implementation uses has several features that can be used to simplify handling of this option, so that is done in this change.
>
> make/autoconf/flags-cflags.m4 line 107:
> 
>> 105: 
>> 106:     # Debug info level should follow the debug format to be effective.
>> 107:     CFLAGS_DEBUG_SYMBOLS="-g -gdwarf-4 -g${NATIVE_DEBUG_SYMBOLS_LEVEL}"
> 
> What is this supposed to fix/accomplish?

Do you mean the addition of the plain -g or the -g with NATIVE_DEBUG_SYMBOLS_LEVEL appended to it? The former I just added for correctness, it's not strictly needed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29214#discussion_r2690103362


More information about the build-dev mailing list