diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-06 12:15:13 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-02-06 13:51:46 -0500 |
commit | 131c58469f6fb68c89b38fee6aba8bbb20c7f4bf (patch) | |
tree | 1c6999f3cc17939dcbbe65f593cb53bfe0e6ad80 | |
parent | d922088eb4ba6bc31a99f17b32cf75e59dd306cd (diff) | |
download | qemu-131c58469f6fb68c89b38fee6aba8bbb20c7f4bf.zip qemu-131c58469f6fb68c89b38fee6aba8bbb20c7f4bf.tar.gz qemu-131c58469f6fb68c89b38fee6aba8bbb20c7f4bf.tar.bz2 |
rust: add --rust-target option for bindgen
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>
Message-ID: <20250206111514.2134895-1-pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 2c9ac9c..131b222 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'] |