build: Don't use ld and objcopy when cross-compiling

These commands don't work when compiling Windows binaries on Linux.
This commit is contained in:
Ting-Wei Lan 2022-03-13 15:14:12 +08:00 committed by Matthias Clasen
parent 53263d3d27
commit e8dd40ccca
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,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

View File

@ -8,7 +8,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