From e8dd40cccab9372bc27fa507932dbec72cd4a572 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Sun, 13 Mar 2022 15:14:12 +0800 Subject: [PATCH] build: Don't use ld and objcopy when cross-compiling These commands don't work when compiling Windows binaries on Linux. --- demos/gtk-demo/meson.build | 2 +- demos/widget-factory/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build index f594cd59b2..fa63dbbb9b 100644 --- a/demos/gtk-demo/meson.build +++ b/demos/gtk-demo/meson.build @@ -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 diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build index 9a083eb1ac..2cfc9732dc 100644 --- a/demos/widget-factory/meson.build +++ b/demos/widget-factory/meson.build @@ -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 -- 2.30.2