[cmake] SplitDebugInformation.cmake: Add --strip-all to the second objcopy command.

Combining the removal of .gnu_debuglink into the objcopy command had the
effect of losing `strip`'s usual stripping functionality. Add the
`--strip-all` parameter to restore it.

Copied over from rom-properties.

This fixes a regression from commit 43372103cb.
(Port over CMake changes from rom-properties.)
This commit is contained in:
David Korth 2024-02-20 23:44:36 -05:00
parent 03ce73c612
commit e3f6c26281

View File

@ -88,6 +88,7 @@ IF(SPLIT_OK)
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug ${OBJCOPY_COMPRESS_DEBUG_SECTIONS_PARAM}
${SPLITDEBUG_SOURCE} ${SPLITDEBUG_TARGET}
COMMAND ${CMAKE_OBJCOPY}
--strip-all
--remove-section=.gnu_debuglink
--add-gnu-debuglink="${SPLITDEBUG_TARGET}"
${SPLITDEBUG_SOURCE}