]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
configure, meson: synchronize defaults for configure and Meson Rust options
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 14 Oct 2024 11:01:13 +0000 (13:01 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 14 Oct 2024 14:48:48 +0000 (15:48 +0100)
If the defaults for --enable-rust ($rust in configure) and Meson's rust
option are out of sync, incremental builds will pick Meson's default.

This happens because, on an incremental build, configure does not run
Meson, Make does instead.  Meson then gets the command line options
from either coredata.dat (which has everything cached in Python's pickle
format) or cmd_line.txt (slow path when Meson version is upgraded), but
neither knows about the rust option, and the meson_options.txt default
is used.

This will cause have_rust to be true if rustc is available; and the build
to fail because configure did not put a RUST_TARGET_TRIPLE in config-host.mak.

When in the Rust pull request I changed the $rust default from auto
to disabled, I should have made the same change to meson_options.txt;
do it now.

Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20241014110113.173946-1-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
configure
meson_options.txt

index 99d57a6ef07f3c3645aa5795cc7e8d6f871408df..72d1a94225051ff6e9da9e9256fc8c30aa728f67 100755 (executable)
--- a/configure
+++ b/configure
@@ -1975,7 +1975,7 @@ if test "$skip_meson" = no; then
   test "$pie" = no && meson_option_add -Db_pie=false
 
   # QEMU options
-  test "$rust" != "auto" && meson_option_add "-Drust=$rust"
+  test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
   test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
   test "$docs" != auto && meson_option_add "-Ddocs=$docs"
   test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
index 5a5c2300261a5d69cff0b163fe24764fa394fea5..0ee4d7bb86b7367a15e4b769ebca8042907fcdad 100644 (file)
@@ -374,5 +374,5 @@ option('hexagon_idef_parser', type : 'boolean', value : true,
 option('x86_version', type : 'combo', choices : ['0', '1', '2', '3', '4'], value: '1',
        description: 'tweak required x86_64 architecture version beyond compiler default')
 
-option('rust', type: 'feature', value: 'auto',
+option('rust', type: 'feature', value: 'disabled',
        description: 'Rust support')