On Mon, 14 Oct 2024 at 15:38, Peter Maydell <peter.mayd...@linaro.org> wrote:
>
> On Mon, 14 Oct 2024 at 15:36, Paolo Bonzini <pbonz...@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.mayd...@linaro.org>
> > ---
> >  meson.build                      | 3 ++-
> >  rust/qemu-api-macros/meson.build | 2 --
> >  2 files changed, 2 insertions(+), 3 deletions(-)
>
> Missing Signed-off-by: line ?

Oh, and is there any better order in which to apply this
patch and your other fix, or does it not matter?

-- PMM

Reply via email to