mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
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
This commit is contained in:
@@ -928,12 +928,8 @@ if not meson.is_cross_build()
|
|||||||
test_resources_binary = custom_target('test_resources.o',
|
test_resources_binary = custom_target('test_resources.o',
|
||||||
input : test_gresource_binary,
|
input : test_gresource_binary,
|
||||||
output : 'test_resources.o',
|
output : 'test_resources.o',
|
||||||
command : [ld,
|
command : cc.cmd_array() + ['-Wl,-z,noexecstack', '-r', '-Wl,-b,binary',
|
||||||
'-z', 'noexecstack',
|
'@INPUT@', '-o','@OUTPUT@'])
|
||||||
'-r',
|
|
||||||
'-b','binary',
|
|
||||||
'@INPUT@',
|
|
||||||
'-o','@OUTPUT@'])
|
|
||||||
|
|
||||||
# Rename symbol to match the one in the C file
|
# Rename symbol to match the one in the C file
|
||||||
if cc.get_id() == 'gcc' and host_system == 'windows'
|
if cc.get_id() == 'gcc' and host_system == 'windows'
|
||||||
@@ -945,7 +941,7 @@ if not meson.is_cross_build()
|
|||||||
input : test_resources_binary,
|
input : test_resources_binary,
|
||||||
output : 'test_resources2.o',
|
output : 'test_resources2.o',
|
||||||
command : [objcopy,
|
command : [objcopy,
|
||||||
'--strip-all',
|
'--strip-debug',
|
||||||
'--add-symbol', underscore + '_g_binary_test1_resource_data=.data:0',
|
'--add-symbol', underscore + '_g_binary_test1_resource_data=.data:0',
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
'@OUTPUT@'])
|
'@OUTPUT@'])
|
||||||
|
Reference in New Issue
Block a user