RFR: 8214796: Create a jlink plugin for stripping debug info symbols from native libraries

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 25 10:49:29 UTC 2019


On 15/02/2019 17:01, Severin Gehwolf wrote:
> :
>
> ----->8-------------------------
> Plugin Name: strip-native-debug-symbols
> Option: --strip-native-debug-symbols=<omit-debuginfo|keep-debuginfo>
> Description: Strip debug symbols from native libraries (if any).
>   This plugin requires at least one option:
>     objcopy: The path to the objcopy binary. Defaults to objcopy in PATH.
>     omit-debuginfo: Do not keep debug info files. Defaults to true.
>     keep-debuginfo[=<ext>]: Keep debug info files in <file>.<ext>.
>                             Defaults to <file>.debuginfo
>   Examples: --strip-native-debug-symbols objcopy=/usr/bin/objcopy
>             --strip-native-debug-symbols=omit-debuginfo
>             --strip-native-debug-symbols keep-debuginfo:objcopy=objcopy
> ----->8-------------------------
>
I haven't had time let to look at the webrev yet but on the CLI options 
then I think the above approach looks quite good. There are 3 existing 
plugins that expose --exclude-XXX options so you might want consider 
renaming "omit" to "exclude" to be consistent. Another suggestion is 
consider adding the "-files" suffix to the debuginfo values so that it's 
clear to anyone reading a script that it's about exclude or keeping 
debuginfo files, e.g.

--strip-native-debug-symbols exclude-debuginfo-files
--strip-native-debug-symbols keep-debuginfo-files=pdb

-Alan


More information about the jigsaw-dev mailing list