summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2023-02-22 16:51:05 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2023-02-22 16:51:05 +0000
commit88fd3f0a762f28f3296a953aee17cf1d440997c1 (patch)
tree622e656f7084184c80ffb4031477c8d445089e19
parent0a715be5997abd13b9bddeb100af31e9678b4a47 (diff)
parentc434743111ca8557862214a4733b05f8b4e11352 (diff)
downloadglib-88fd3f0a762f28f3296a953aee17cf1d440997c1.tar.gz
Merge branch 'build-with-llvm-toolchain' into 'main'
Fix building gio/tests/test_resources.o with LLVM ld Closes #2720 See merge request GNOME/glib!3186
-rw-r--r--gio/tests/meson.build10
1 files changed, 3 insertions, 7 deletions
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index de5b80d72..b4a64926e 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -928,12 +928,8 @@ if not meson.is_cross_build()
test_resources_binary = custom_target('test_resources.o',
input : test_gresource_binary,
output : 'test_resources.o',
- command : [ld,
- '-z', 'noexecstack',
- '-r',
- '-b','binary',
- '@INPUT@',
- '-o','@OUTPUT@'])
+ command : cc.cmd_array() + ['-Wl,-z,noexecstack', '-r', '-Wl,-b,binary',
+ '@INPUT@', '-o','@OUTPUT@'])
# Rename symbol to match the one in the C file
if cc.get_id() == 'gcc' and host_system == 'windows'
@@ -945,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@'])