[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] rust: add --rust-target option for bindgen
From: |
Paolo Bonzini |
Subject: |
[PATCH] rust: add --rust-target option for bindgen |
Date: |
Thu, 6 Feb 2025 12:15:13 +0100 |
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']
--
2.48.1
- [PATCH] rust: add --rust-target option for bindgen,
Paolo Bonzini <=
- [PATCH] rust: pl011: convert pl011_create to safe Rust, Paolo Bonzini, 2025/02/06
- Re: [PATCH] rust: pl011: convert pl011_create to safe Rust, Zhao Liu, 2025/02/10
- vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Paolo Bonzini, 2025/02/10
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Junjie Mao, 2025/02/11
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Paolo Bonzini, 2025/02/11
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Junjie Mao, 2025/02/11
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Junjie Mao, 2025/02/11
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Paolo Bonzini, 2025/02/11
- Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust), Junjie Mao, 2025/02/11
Re: [PATCH] rust: add --rust-target option for bindgen, Philippe Mathieu-Daudé, 2025/02/06