RFR: 8271148: static-libs-image target --with-native-debug-symbols=external doesn't produce debug info
Erik Joelsson
erikj at openjdk.java.net
Fri Aug 27 17:35:26 UTC 2021
On Thu, 22 Jul 2021 16:43:26 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> Hi!
>
> Please review this tiny patch which removes the special casing of `--with-native-debug-symbols=external` for the static libs build. I don't see why this is needed. If no debug symbols are wanted `--with-native-debug-symbols=none` can be used to achieve the same effect. Therefore, I propose to remove this hunk.
>
> Testing: Inspecting of the log files and seeing that `-g` switch is there. Run the reproducer test on the resulting static libraries.
>
> Thoughts?
We currently have:
`--with-native-debug-symbols=internal`: Dynamic libs: debug symbols internal. Static libs: debug symbols internal
`--with-native-debug-symbols=external`: Dynamic libs: debug symbols external. Static libs: No debug symbols
With the suggested change:
`--with-native-debug-symbols=external`: Dynamic libs: debug symbols external. Static libs: debug symbols **internal**
I don't think that's a good idea. There are two important points when picking _external_. 1: that you get debug symbols, but at least equally important, 2: that debug symbols are not left around in the product bits (which are distributed). Yes, we at Oracle are indeed relying on release product bits being completely stripped and void of any debug symbols. I agree that it's clunky. We just never had a need for saving debug symbols for the static libs, so no effort was put into implementing that support.
I would be ok with the patch if it instead changed to:
`--with-native-debug-symbols=external`: Dynamic libs: debug symbols external. Static libs: debug symbols **external**
Right now we don't have the necessary build logic implemented in NativeCompilation.gmk for moving debugsymbols to external files for static libs, so such a change would need to provide that implementation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4876
More information about the build-dev
mailing list