From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] meson: check in main meson.build for native Rust compiler
Date: Mon, 14 Oct 2024 17:04:26 +0100 [thread overview]
Message-ID: <CAFEAcA8n81hFE0ZpuXEBUnWFmH1L0WPde9t17D6vqtwup3Aqkg@mail.gmail.com> (raw)
In-Reply-To: <20241014143640.196735-1-pbonzini@redhat.com>
On Mon, 14 Oct 2024 at 15:36, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> A working native Rust compiler is always needed in order to compile Rust
> code, even when cross compiling, in order to build the procedural macros
> that QEMU uses.
>
> Right now, the check is done in rust/qemu-api-macros/meson.build, but this
> has two disadvantages. First, it makes the build fail when the Meson "rust"
> option is set to "auto" (instead, Rust support should be disabled). Second,
> add_languages() is one of the few functions that are executed even by
> "meson introspect", except that "meson introspect" executes both branches
> of "if" statements! Therefore, "meson introspect" tries to look for a
> Rust compiler even if the option is disabled---and then fails because
> the compiler is required by rust/qemu-api-macros/meson.build. This is
> visible for example if the compilation host has a stale
> scripts/meson-buildoptions.sh and no rustc installed.
>
> Both issues can be fixed by moving the check to the main meson.build,
> together with the check for the cross compiler.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> ---
Applied directly to git, thanks.
-- PMM
prev parent reply other threads:[~2024-10-14 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 14:36 [PATCH] meson: check in main meson.build for native Rust compiler Paolo Bonzini
2024-10-14 14:38 ` Peter Maydell
2024-10-14 14:40 ` Peter Maydell
2024-10-14 14:43 ` Paolo Bonzini
2024-10-14 16:04 ` Peter Maydell [this message]
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=CAFEAcA8n81hFE0ZpuXEBUnWFmH1L0WPde9t17D6vqtwup3Aqkg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).