From 89002b45626c251bc2b8d8bad5b2e37016991868 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 8 Jun 2023 17:33:47 +0530 Subject: meson: Don't override RUSTFLAGS in the env Meson does not add RUSTFLAGS to rustc.cmd_array(), so the effect of this code is to override that value in the env. This is hacky, since the env has to match during setup and compile now, and rust_args added in the cross / native file will be ignored. But at least it fixes this regression: Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/372 Part-of: --- meson.build | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 3d5a72093..05b9a3d8a 100644 --- a/meson.build +++ b/meson.build @@ -386,17 +386,8 @@ if pkg_config_path.length() > 0 extra_env += {'PKG_CONFIG_PATH': pathsep.join(pkg_config_path)} endif -# get compiler and flags for rust (if any) -rustc_cmd = '' -rust_flags = [] -foreach rustc_arg : rustc.cmd_array() - if rustc_cmd == '' - rustc_cmd = rustc_arg - else - rust_flags += [rustc_arg] - endif -endforeach -extra_env += {'RUSTC': rustc_cmd, 'RUSTFLAGS': ' '.join(rust_flags)} +# get cmdline for rust +extra_env += {'RUSTC': ' '.join(rustc.cmd_array())} rs_plugins = custom_target('gst-plugins-rs', build_by_default: true, -- cgit v1.2.3