Fix build of gio/ttests/est_resources2.o with LLVM objcopy

LLVM objcopy's --strip-all is more aggressive that GNU objcopy --strip-all
and will remove everything that is not actually used. In this case we
see the following error:
`error: 'gio/tests/test_resources.o': Symbol table has link index of 5 which is not a valid index`

Fix this by only removing debug symbols instead of all unused symbols and
sections.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2720
This commit is contained in:
Alex Richardson 2023-01-08 11:17:19 +00:00
parent 6d93568e36
commit c434743111

View File

@ -941,7 +941,7 @@ if not meson.is_cross_build()
input : test_resources_binary,
output : 'test_resources2.o',
command : [objcopy,
'--strip-all',
'--strip-debug',
'--add-symbol', underscore + '_g_binary_test1_resource_data=.data:0',
'@INPUT@',
'@OUTPUT@'])