aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-25 10:24:01 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-05 14:18:16 +0100
commitc6ea723da9acd63fb4ef2350318168bf4645835e (patch)
tree895ef46dedb741049e800c1a2e368b10c902ccd9 /scripts
parent718e255f0a97cf43939ae2e90ba4673ae9a8bd2f (diff)
downloadqemu-c6ea723da9acd63fb4ef2350318168bf4645835e.zip
qemu-c6ea723da9acd63fb4ef2350318168bf4645835e.tar.gz
qemu-c6ea723da9acd63fb4ef2350318168bf4645835e.tar.bz2
rust: silence unknown warnings for the sake of old compilers
Occasionally, we may need to silence warnings and clippy lints that were only introduced in newer Rust compiler versions. However, this would fail when compiling with an older rustc: error: unknown lint: `non_local_definitions` --> rust/qemu-api/rust-qemu-api-tests.p/structured/offset_of.rs:79:17 So by default we need to block the unknown_lints warning. To avoid misspelled lints or other similar issues, re-enable it in the CI job that uses nightly rust. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/meson-buildoptions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 6f2bb08..f9693d2 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -47,6 +47,8 @@ meson_options_help() {
printf "%s\n" ' getrandom()'
printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protection (requires'
printf "%s\n" ' clang/llvm and coroutine backend ucontext)'
+ printf "%s\n" ' --enable-strict-rust-lints'
+ printf "%s\n" ' Enable stricter set of Rust warnings'
printf "%s\n" ' --enable-strip Strip targets on install'
printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)'
printf "%s\n" ' --enable-trace-backends=CHOICES'
@@ -493,6 +495,8 @@ _meson_option_parse() {
--disable-spice-protocol) printf "%s" -Dspice_protocol=disabled ;;
--enable-stack-protector) printf "%s" -Dstack_protector=enabled ;;
--disable-stack-protector) printf "%s" -Dstack_protector=disabled ;;
+ --enable-strict-rust-lints) printf "%s" -Dstrict_rust_lints=true ;;
+ --disable-strict-rust-lints) printf "%s" -Dstrict_rust_lints=false ;;
--enable-strip) printf "%s" -Dstrip=true ;;
--disable-strip) printf "%s" -Dstrip=false ;;
--sysconfdir=*) quote_sh "-Dsysconfdir=$2" ;;