Currently the risk is none as --strip-debug will perform the same as it performed prior this patch. Only after
JDK-8214796, --strip-debug does more than what it did before. For users only wanting Java debug symbols stripping, --strip-java-debug-attributes will be available.
add/remove/modify command line option
--strip-java-debug-attributes. Currently the same behaviour is available via option
--strip-debug, which might gain additional functionality, such as stripping native debug symbols, in the future.
While working on JDK-8214796, which introduces a mechanism for stripping native debug symbols from executables and shared libraries, it was observed that there exists a more generic
--strip-debug option already. However, that version currently only strips Java debug attributes from class files. For one, the current
--strip-debug option seems misleading as it's not clear which debug information is actually being stripped. That's the reason why it was suggested to move the current
--strip-debug plugin functionality to a more telling name,
--strip-java-debug-attributes. This would then open up the possibility of
--strip-debug to perform more than just Java debug attributes stripping. One such candidate of additional stripping performed by
--strip-debug would be stripping of native debug symbols from executables and shared libraries.
The proposed solution moves current functionality of stripping Java debug attributes from class files to a new plugin, invoked via
--strip-debug will delegate to
--strip-java-debug-attributes. In a future version
--strip-debug might also invoke a plugin for native debug symbols stripping (See JDK-8214796).
An alternative solution would be to keep
--strip-debug as is and only add
--strip-native-debug-symbols via JDK-8214796. This has the drawback of not being able to implement
--strip-debug as a compound command to invoke both,
--strip-native-debug-symbols as well as it being not very clear.
--strip-debug help keeps its workings rather broad via its description: "Strip debug information from the output image". It seems misleading to only strip Java debug attributes for an implementation of this plugin.
References to relevant review discussions:
--strip-debug inconsistency is being noted here:
--strip-debug is being suggested as a pre-requisite of
--list-plugins output will include this output for
Plugin Name: strip-java-debug-attributes Option: --strip-java-debug-attributes Description: Strip Java debug attributes from classes in the output image
--strip-debug help output will remain as is:
Plugin Name: strip-debug Option: --strip-debug Description: Strip debug information from the output image
- csr of
JDK-8218913 Rename --strip-debug jlink plugin