From e522768ef46de78a9ac11cbd81b7f92560228743 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 14 Jun 2021 14:48:14 +0100 Subject: [PATCH] tests: Allow GResource external data tests to use llvm-objcopy Relax the requirement for the test to only be compiled/run under gcc, since a version of LLVM was released which supports `--add-symbol`. `objcopy` should be overrideable to be `llvm-objcopy` by using a machine file as per https://mesonbuild.com/Machine-files.html#binaries. Suggested and tested by Grigory Vasilyev. Signed-off-by: Philip Withnall Fixes: #2423 --- gio/tests/meson.build | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index a926ae01a..98d1401d0 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -675,10 +675,8 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() ] # Create object file containing resource data for testing the --external-data - # option. Currently only GNU ld and GNU objcopy support the right options. - # Support for --add-symbol was added to LLVM objcopy in 2019 - # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for - # LLVM once that support is in a stable release. + # option. Currently only GNU ld and objcopy, or (as of 2019) LLVM ld and + # objcopy, support the right options. objcopy_supports_add_symbol = false objcopy = find_program('objcopy', required : false) if objcopy.found() @@ -687,7 +685,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() ld = find_program('ld', required : false) - if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() and objcopy_supports_add_symbol and ld.found() + if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found() test_gresource_binary = custom_target('test5.gresource', input : 'test5.gresource.xml', output : 'test5.gresource',