From: Dmitry Baryshkov Date: Fri, 18 Apr 2025 00:57:12 +0000 (+0300) Subject: meson: pass -target and -I to bindgen calls X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40008d55c01681c60088e5b7defb0b8513a4ed1c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git meson: pass -target and -I to bindgen calls In order to properly generate Rust bindings for the target systems, we need to pass '-taget foo-linux-gnueabi' flags and a correct include target include path (${STAGING_INCDIR}) to the bindgen. Add those flags to the generated meson target file. Signed-off-by: Dmitry Baryshkov Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index cbfc45b94bb..ef45a034a76 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)} [properties] needs_exe_wrapper = true sys_root = '${STAGING_DIR_HOST}' +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}'] [host_machine] system = '${@meson_operating_system('HOST_OS', d)}'