qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 10/10] configure: move --enable-debug-tcg to meson
Date: Tue, 29 Aug 2023 10:29:31 +0200	[thread overview]
Message-ID: <20230829082931.67601-11-pbonzini@redhat.com> (raw)
In-Reply-To: <20230829082931.67601-1-pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                     | 11 +----------
 meson.build                   |  3 ++-
 meson_options.txt             |  2 ++
 scripts/meson-buildoptions.sh |  3 +++
 4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index aed48db68fd..40729a6d5f5 100755
--- a/configure
+++ b/configure
@@ -248,7 +248,6 @@ done
 default_cflags='-O2 -g'
 git_submodules_action="update"
 git="git"
-debug_tcg="no"
 docs="auto"
 EXESUF=""
 prefix="/usr/local"
@@ -747,13 +746,9 @@ for opt do
     # configure to be used by RPM and similar macros that set
     # lots of directory switches by default.
   ;;
-  --enable-debug-tcg) debug_tcg="yes"
-  ;;
-  --disable-debug-tcg) debug_tcg="no"
-  ;;
   --enable-debug)
       # Enable debugging options that aren't excessively noisy
-      debug_tcg="yes"
+      meson_option_parse --enable-debug-tcg ""
       meson_option_parse --enable-debug-graph-lock ""
       meson_option_parse --enable-debug-mutex ""
       meson_option_add -Doptimization=0
@@ -948,7 +943,6 @@ cat << EOF
   linux-user      all linux usermode emulation targets
   bsd-user        all BSD usermode emulation targets
   pie             Position Independent Executables
-  debug-tcg       TCG debugging (default is disabled)
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -1699,9 +1693,6 @@ echo >> $config_host_mak
 
 echo all: >> $config_host_mak
 
-if test "$debug_tcg" = "yes" ; then
-  echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
-fi
 if test "$targetos" = "windows"; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
   echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak
diff --git a/meson.build b/meson.build
index d3d10140c57..45f9cc62a60 100644
--- a/meson.build
+++ b/meson.build
@@ -2201,6 +2201,7 @@ config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool)
 config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
 config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
 config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
+config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))
 config_host_data.set('CONFIG_GPROF', get_option('gprof'))
 config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed())
 config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
@@ -4158,7 +4159,7 @@ if config_all.has_key('CONFIG_TCG')
     summary_info += {'TCG backend':   'native (@0@)'.format(cpu)}
   endif
   summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')}
-  summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')}
+  summary_info += {'TCG debug enabled': get_option('debug_tcg')}
 endif
 summary_info += {'target list':       ' '.join(target_dirs)}
 if have_system
diff --git a/meson_options.txt b/meson_options.txt
index aaea5ddd779..5d6b889554c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -83,6 +83,8 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto',
        description: 'Xen PCI passthrough support')
 option('tcg', type: 'feature', value: 'enabled',
        description: 'TCG support')
+option('debug_tcg', type: 'boolean', value: false,
+       description: 'TCG debugging')
 option('tcg_interpreter', type: 'boolean', value: false,
        description: 'TCG with bytecode interpreter (slow)')
 option('safe_stack', type: 'boolean', value: false,
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 9da3fe299b7..5567fd29985 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -29,6 +29,7 @@ meson_options_help() {
   printf "%s\n" '  --enable-debug-mutex     mutex debugging support'
   printf "%s\n" '  --enable-debug-stack-usage'
   printf "%s\n" '                           measure coroutine stack usage'
+  printf "%s\n" '  --enable-debug-tcg       TCG debugging'
   printf "%s\n" '  --enable-fdt[=CHOICE]    Whether and how to find the libfdt library'
   printf "%s\n" '                           (choices: auto/disabled/enabled/internal/system)'
   printf "%s\n" '  --enable-fuzzing         build fuzzing targets'
@@ -276,6 +277,8 @@ _meson_option_parse() {
     --disable-debug-mutex) printf "%s" -Ddebug_mutex=false ;;
     --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=true ;;
     --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;;
+    --enable-debug-tcg) printf "%s" -Ddebug_tcg=true ;;
+    --disable-debug-tcg) printf "%s" -Ddebug_tcg=false ;;
     --enable-dmg) printf "%s" -Ddmg=enabled ;;
     --disable-dmg) printf "%s" -Ddmg=disabled ;;
     --docdir=*) quote_sh "-Ddocdir=$2" ;;
-- 
2.41.0



  parent reply	other threads:[~2023-08-29  8:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
2023-08-29  8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
2023-08-29 17:14   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
2023-08-29 10:34   ` Daniel P. Berrangé
2023-08-31  8:20     ` Paolo Bonzini
2023-08-31  8:51       ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
2023-08-29 17:12   ` Daniel P. Berrangé
2023-08-29 18:40   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
2023-08-29 16:54   ` Peter Maydell
2023-08-29 17:14   ` Daniel P. Berrangé
2023-08-31  8:26     ` Paolo Bonzini
2023-08-29 18:45   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 05/10] meson: compile bundled device trees Paolo Bonzini
2023-08-29 14:25   ` Philippe Mathieu-Daudé
2023-08-29 18:48     ` Richard Henderson
2023-08-29 18:47   ` Richard Henderson
2023-08-29  8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
2023-08-29 17:16   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
2023-08-29 14:26   ` Philippe Mathieu-Daudé
2023-08-29 17:05   ` Daniel P. Berrangé
2023-08-29  8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
2023-08-29 14:28   ` Philippe Mathieu-Daudé
2023-08-29  8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
2023-08-29 14:28   ` Philippe Mathieu-Daudé
2023-08-29 17:05   ` Daniel P. Berrangé
2023-08-29  8:29 ` Paolo Bonzini [this message]
2023-08-29 16:57   ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Peter Maydell
2023-08-29 18:52   ` Richard Henderson
2023-08-31  8:17   ` Philippe Mathieu-Daudé

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=20230829082931.67601-11-pbonzini@redhat.com \
    --to=pbonzini@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).