Hi Manos, On Mon, Jul 22, 2024 at 02:43:31PM +0300, Manos Pitsidianakis wrote: > Date: Mon, 22 Jul 2024 14:43:31 +0300 > From: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> > Subject: [RFC PATCH v5 1/8] build-sys: Add rust feature option > X-Mailer: git-send-email 2.44.0 > > Add rust feature in meson.build, configure, to prepare for adding Rust > code in the followup commits. > > Signed-off-by: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> > --- > MAINTAINERS | 5 +++++ > configure | 12 ++++++++++++ > meson.build | 17 ++++++++++++++++- > Kconfig | 1 + > Kconfig.host | 3 +++ > meson_options.txt | 5 +++++ > rust/Kconfig | 0 > scripts/meson-buildoptions.sh | 3 +++ > 8 files changed, 45 insertions(+), 1 deletion(-) > create mode 100644 rust/Kconfig >
[snip] > diff --git a/meson.build b/meson.build > index a1e51277b0..a3f346ab3c 100644 > --- a/meson.build > +++ b/meson.build > @@ -70,6 +70,14 @@ if host_os == 'darwin' and \ > all_languages += ['objc'] > objc = meson.get_compiler('objc') > endif > +if get_option('have_rust') and meson.version().version_compare('<1.0.0') > + error('Rust support requires Meson version >=1.0.0') > +endif > +have_rust = false > +if not get_option('disable_rust') and add_languages('rust', required: > get_option('have_rust'), native: false) > + rustc = meson.get_compiler('rust') > + have_rust = true > +endif Only a nit, "disable_rust" seems redundant, and "have_rust" is enough. Others LGTM, Reviewed-by: Zhao Liu <zhao1....@intel.com>