From c434743111ca8557862214a4733b05f8b4e11352 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 8 Jan 2023 11:17:19 +0000 Subject: [PATCH] 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 --- gio/tests/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 3557b6944..b4a64926e 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -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@'])