[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/25] configure: omit options with default values from meson comm
From: |
Paolo Bonzini |
Subject: |
[PULL 16/25] configure: omit options with default values from meson command line |
Date: |
Fri, 29 Apr 2022 17:23:03 +0200 |
This has no functional change, it only makes the command line shorter
and nicer.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 29 +++++++++++++++++------------
meson.build | 2 +-
meson_options.txt | 2 +-
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/configure b/configure
index fc7868948b..1c88e697c5 100755
--- a/configure
+++ b/configure
@@ -2350,19 +2350,24 @@ if test "$skip_meson" = no; then
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
+
+ # Built-in options
+ test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
+ test "$default_feature" = no && meson_option_add -Dauto_features=disabled
+ test "$pie" = no && meson_option_add -Db_pie=false
+ test "$werror" = yes && meson_option_add -Dwerror=true
+
+ # QEMU options
+ test "$capstone" != auto && meson_option_add "-Dcapstone=$capstone"
+ test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
+ test "$fdt" != auto && meson_option_add "-Dfdt=$fdt"
+ test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
+ test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
+ test "$slirp" != auto && meson_option_add "-Dslirp=$slirp"
+ test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd"
+ test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
run_meson() {
- NINJA=$ninja $meson setup \
- --prefix "$prefix" \
- --bindir "$bindir" \
- -Dqemu_suffix="$qemu_suffix" \
- -Dsmbd="$smbd" \
- -Dwerror=$(if test "$werror" = yes; then echo true; else echo false;
fi) \
- -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
- -Dcfi=$cfi -Dtcg=$tcg \
- -Dcapstone=$capstone -Dfdt=$fdt -Dslirp=$slirp \
- $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE") \
- $(if test "$default_feature" = no; then echo
"-Dauto_features=disabled"; fi) \
- "$@" $cross_arg "$PWD" "$source_path"
+ NINJA=$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD"
"$source_path"
}
eval run_meson $meson_options
if test "$?" -ne 0 ; then
diff --git a/meson.build b/meson.build
index 19966e0a5a..7c52ef135c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('qemu', ['c'], meson_version: '>=0.59.3',
default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11',
'b_colorout=auto',
- 'b_staticpic=false', 'stdsplit=false',
'optimization=2'],
+ 'b_staticpic=false', 'stdsplit=false',
'optimization=2', 'b_pie=true'],
version: files('VERSION'))
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
diff --git a/meson_options.txt b/meson_options.txt
index 15fe40c700..35f5a72507 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -78,7 +78,7 @@ option('xen', type: 'feature', value: 'auto',
description: 'Xen backend support')
option('xen_pci_passthrough', type: 'feature', value: 'auto',
description: 'Xen PCI passthrough support')
-option('tcg', type: 'feature', value: 'auto',
+option('tcg', type: 'feature', value: 'enabled',
description: 'TCG support')
option('tcg_interpreter', type: 'boolean', value: false,
description: 'TCG with bytecode interpreter (slow)')
--
2.35.1
- [PULL 06/25] configure, meson: move iasl detection to meson, (continued)
- [PULL 06/25] configure, meson: move iasl detection to meson, Paolo Bonzini, 2022/04/29
- [PULL 08/25] configure: switch string options to automatic parsing, Paolo Bonzini, 2022/04/29
- [PULL 05/25] meson, configure: move Xen detection to meson, Paolo Bonzini, 2022/04/29
- [PULL 09/25] meson, configure: move --tls-priority to meson, Paolo Bonzini, 2022/04/29
- [PULL 10/25] meson, configure: move bdrv whitelists to meson, Paolo Bonzini, 2022/04/29
- [PULL 11/25] meson, configure: move --with-pkgversion, CONFIG_STAMP to meson, Paolo Bonzini, 2022/04/29
- [PULL 07/25] configure: move Windows flags detection to meson, Paolo Bonzini, 2022/04/29
- [PULL 12/25] meson, configure: move --interp-prefix to meson, Paolo Bonzini, 2022/04/29
- [PULL 13/25] meson: always combine directories with prefix, Paolo Bonzini, 2022/04/29
- [PULL 17/25] meson, virtio: place all virtio-pci devices under virtio_pci_ss, Paolo Bonzini, 2022/04/29
- [PULL 16/25] configure: omit options with default values from meson command line,
Paolo Bonzini <=
- [PULL 15/25] meson: pass more options directly as -D, Paolo Bonzini, 2022/04/29
- [PULL 21/25] build: move vhost-user-fs configuration to Kconfig, Paolo Bonzini, 2022/04/29
- [PULL 24/25] configure, meson: move vhost options to Meson, Paolo Bonzini, 2022/04/29
- [PULL 19/25] build: move vhost-vsock configuration to Kconfig, Paolo Bonzini, 2022/04/29
- [PULL 14/25] configure: switch directory options to automatic parsing, Paolo Bonzini, 2022/04/29
- [PULL 18/25] configure: simplify vhost-net-{user, vdpa} configuration, Paolo Bonzini, 2022/04/29
- [PULL 20/25] build: move vhost-scsi configuration to Kconfig, Paolo Bonzini, 2022/04/29
- [PULL 22/25] meson: create have_vhost_* variables, Paolo Bonzini, 2022/04/29
- [PULL 23/25] meson: use have_vhost_* variables to pick sources, Paolo Bonzini, 2022/04/29
- [PULL 25/25] pc: remove -soundhw pcspk, Paolo Bonzini, 2022/04/29