From 297fd7327e3afd9bacb7df0fe3fa4a94925e0ee4 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 20 Feb 2021 13:12:20 +0100 Subject: [PATCH] build-style/meson.sh: move _args to build-in options section and fix cross compiling of rust code It seems like meson is dropping rust_args when testing the rust compiler, so we just append them directly to rustc --- common/build-style/meson.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index b1eddda36e7..c59fd7d984d 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -53,7 +53,7 @@ strip = '${STRIP}' readelf = '${READELF}' objcopy = '${OBJCOPY}' pkgconfig = '${PKG_CONFIG}' -rust = 'rustc' +rust = ['rustc', '--target', '${RUST_TARGET}' ,'--sysroot', '${XBPS_CROSS_BASE}/usr'] g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner' g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler' g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate' @@ -62,6 +62,8 @@ cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config' [properties] needs_exe_wrapper = true + +[built-in options] c_args = ['$(echo ${CFLAGS} | sed -r "s/\s+/','/g")'] c_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")']