qemu-rust.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org, qemu-stable@nongnu.org,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: Re: [PATCH] rust: add --rust-target option for bindgen
Date: Thu, 6 Feb 2025 12:37:16 +0100	[thread overview]
Message-ID: <298a7473-e5e5-418d-8902-2cbd30730db6@linaro.org> (raw)
In-Reply-To: <20250206111514.2134895-1-pbonzini@redhat.com>

On 6/2/25 12:15, Paolo Bonzini wrote:
> Without it, recent bindgen will give an error
> 
>     error: extern block cannot be declared unsafe
> 
> if rustc is not new enough to support the "unsafe extern" construct.
> 
> Cc: qemu-rust@nongnu.org
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   meson.build | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 2c9ac9cfe1e..131b2225ab6 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -4054,6 +4054,9 @@ if have_rust
>         bindgen_args += ['--formatter', 'none']
>       endif
>     endif
> +  if bindgen.version().version_compare('>=0.66.0')
> +    bindgen_args += ['--rust-target', '1.59']
> +  endif
>     if bindgen.version().version_compare('<0.61.0')
>       # default in 0.61+
>       bindgen_args += ['--size_t-is-usize']

Should this be merged directly on master as build-fix?


  parent reply	other threads:[~2025-02-06 11:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 11:15 [PATCH] rust: add --rust-target option for bindgen Paolo Bonzini
2025-02-06 11:15 ` [PATCH] rust: pl011: convert pl011_create to safe Rust Paolo Bonzini
2025-02-10  9:59   ` Zhao Liu
2025-02-10 10:47     ` vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust) Paolo Bonzini
2025-02-11  5:21       ` Junjie Mao
2025-02-11  9:00         ` Paolo Bonzini
2025-02-11 10:31           ` Junjie Mao
2025-02-11 12:16             ` Junjie Mao
2025-02-11 12:27             ` Paolo Bonzini
2025-02-12  1:22               ` Junjie Mao
2025-02-06 11:37 ` Philippe Mathieu-Daudé [this message]
2025-02-06 11:38   ` [PATCH] rust: add --rust-target option for bindgen Paolo Bonzini
2025-02-06 11:43     ` Philippe Mathieu-Daudé
2025-02-08 14:03       ` Stefan Hajnoczi

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=298a7473-e5e5-418d-8902-2cbd30730db6@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.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 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).