diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2021-06-14 14:48:14 +0100 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2021-06-14 14:49:59 +0100 |
commit | e522768ef46de78a9ac11cbd81b7f92560228743 (patch) | |
tree | 8a586f8016b1368e1172a412fe601c225cd3f2f0 | |
parent | de74a70b7e1ab0c0f380248c1524f0bfad3d852b (diff) | |
download | glib-e522768ef46de78a9ac11cbd81b7f92560228743.tar.gz |
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 <pwithnall@endlessos.org>
Fixes: #2423
-rw-r--r-- | gio/tests/meson.build | 8 |
1 files 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', |