qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com
Subject: [PATCH v2 26/34] configure: omit options with default values from meson command line
Date: Sat, 23 Apr 2022 14:51:43 +0200	[thread overview]
Message-ID: <20220423125151.27821-27-pbonzini@redhat.com> (raw)
In-Reply-To: <20220423125151.27821-1-pbonzini@redhat.com>

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 c6edbceff0..19947d8d6c 100755
--- a/configure
+++ b/configure
@@ -2348,19 +2348,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 1fa4cc255e..6913ab0251 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 a76fadbd7d..8efd5f520c 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




  parent reply	other threads:[~2022-04-23 13:14 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23 12:51 [PATCH v2 00/34] Misc meson conversions for QEMU 7.1 Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 01/34] meson: show final set of compiler flags Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 02/34] configure: remove dead code Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 03/34] qga: wixl: get path to sysroot from pkg-config as intended Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 04/34] configure: pc-bios/qemu-icon.bmp does not exist Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 05/34] configure: gcov should not exclude fortify-source Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 06/34] configure: move --enable/--disable-debug-info to second option parsing pass Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 07/34] configure, meson: move OpenGL check to meson Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 08/34] meson, configure: move RDMA options " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 09/34] meson, configure: move keyctl test " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 10/34] meson, configure: move usbfs " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 11/34] meson, configure: move libgio " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 12/34] meson: remove CONFIG_XEN_PCI_PASSTHROUGH from config-target.h Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 13/34] meson, configure: move --enable-module-upgrades to meson Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 14/34] meson, configure: move Xen detection " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 15/34] meson-buildoptions: add support for string options Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 16/34] configure, meson: move iasl detection to meson Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 17/34] configure: move Windows flags " Paolo Bonzini
2022-04-24 12:33   ` Marc-André Lureau
2022-04-23 12:51 ` [PATCH v2 18/34] configure: switch string options to automatic parsing Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 19/34] meson, configure: move --tls-priority to meson Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 20/34] meson, configure: move bdrv whitelists " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 21/34] meson, configure: move --with-pkgversion, CONFIG_STAMP " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 22/34] meson, configure: move --interp-prefix " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 23/34] meson: always combine directories with prefix Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 24/34] configure: switch directory options to automatic parsing Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 25/34] meson: pass more options directly as -D Paolo Bonzini
2022-04-23 12:51 ` Paolo Bonzini [this message]
2022-04-23 12:51 ` [PATCH v2 27/34] meson, virtio: place all virtio-pci devices under virtio_pci_ss Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 28/34] configure: simplify vhost-net-{user, vdpa} configuration Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 29/34] build: move vhost-vsock configuration to Kconfig Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 30/34] build: move vhost-scsi " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 31/34] build: move vhost-user-fs " Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 32/34] meson: create have_vhost_* variables Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 33/34] meson: use have_vhost_* variables to pick sources Paolo Bonzini
2022-04-23 12:51 ` [PATCH v2 34/34] configure, meson: move vhost options to Meson Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220423125151.27821-27-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).