build: Don't use ld when cross-compiling

We can't guarantee anything on the target toolchain, in that case.
This commit is contained in:
Emmanuele Bassi 2021-11-04 13:41:35 +00:00
parent b2a1fb7149
commit a1861112ee

View File

@ -872,7 +872,7 @@ endif
ld = find_program('ld', required : false)
if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
glib_compile_resources = find_program('glib-compile-resources')
# Create the resource blob