From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Alex Benné e" <alex.bennee@linaro.org>,
"Daniel P. Berrangé " <berrange@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé " <philmd@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
rowan.hart@intel.com,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [RFC PATCH v5 1/8] build-sys: Add rust feature option
Date: Tue, 23 Jul 2024 13:13:09 +0300 [thread overview]
Message-ID: <h2na6.fj0mlm6syrpr@linaro.org> (raw)
In-Reply-To: <Zp9PxB4ZyLDgWGtM@intel.com>
On Tue, 23 Jul 2024 09:37, Zhao Liu <zhao1.liu@intel.com> wrote:
>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.pitsidianakis@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.pitsidianakis@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.liu@intel.com>
>
Hello Zhao, thank you for your review! Indeed it does seem redundant, I
added it to allow graceful fallback to not using Rust if the compiler is
not detected by meson.
Manos
next prev parent reply other threads:[~2024-07-23 10:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 11:43 [RFC PATCH v5 0/8] Add Rust support, implement ARM PL011 Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 1/8] build-sys: Add rust feature option Manos Pitsidianakis
2024-07-23 6:37 ` Zhao Liu
2024-07-23 10:13 ` Manos Pitsidianakis [this message]
2024-07-22 11:43 ` [RFC PATCH v5 2/8] build deps: update lcitool to include rust bits Manos Pitsidianakis
2024-07-23 8:31 ` Richard Henderson
2024-07-23 10:11 ` Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job Manos Pitsidianakis
2024-07-23 8:32 ` Richard Henderson
2024-07-23 8:39 ` Daniel P. Berrangé
2024-07-23 10:06 ` Manos Pitsidianakis
2024-07-23 10:11 ` Daniel P. Berrangé
2024-07-23 10:24 ` Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 4/8] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 5/8] .gitattributes: add Rust diff and merge attributes Manos Pitsidianakis
2024-07-23 8:38 ` Zhao Liu
2024-07-22 11:43 ` [RFC PATCH v5 6/8] rust: add crate to expose bindings and interfaces Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 7/8] rust: add PL011 device model Manos Pitsidianakis
2024-07-22 11:43 ` [RFC PATCH v5 8/8] rust/pl011: vendor dependencies Manos Pitsidianakis
2024-07-23 8:37 ` Zhao Liu
2024-07-23 10:19 ` Manos Pitsidianakis
2024-07-23 15:07 ` [RFC PATCH v5 0/8] Add Rust support, implement ARM PL011 Paolo Bonzini
2024-07-24 9:14 ` Manos Pitsidianakis
2024-07-24 10:34 ` Paolo Bonzini
2024-07-25 5:47 ` Manos Pitsidianakis
2024-07-25 9:50 ` Paolo Bonzini
2024-07-25 10:02 ` Manos Pitsidianakis
2024-07-25 11:19 ` Paolo Bonzini
2024-07-25 14:48 ` Manos Pitsidianakis
2024-07-25 15:15 ` Paolo Bonzini
2024-07-26 7:12 ` Manos Pitsidianakis
2024-07-26 8:19 ` Paolo Bonzini
2024-07-26 9:26 ` Manos Pitsidianakis
2024-07-31 9:41 ` Manos Pitsidianakis
2024-07-31 10:35 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=h2na6.fj0mlm6syrpr@linaro.org \
--to=manos.pitsidianakis@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=mads@ynddal.dk \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rowan.hart@intel.com \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.