[PATCH 18/24] build: move --disable-debug-info to meson

Paolo Bonzini posted 24 patches 2 years, 9 months ago
[PATCH 18/24] build: move --disable-debug-info to meson
Posted by Paolo Bonzini 2 years, 9 months ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                     | 5 -----
 scripts/meson-buildoptions.py | 2 ++
 scripts/meson-buildoptions.sh | 3 +++
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index b58ea2aba1f3..6e5e91908a4b 100755
--- a/configure
+++ b/configure
@@ -694,10 +694,6 @@ for opt do
   ;;
   --cross-prefix-*)
   ;;
-  --enable-debug-info) meson_option_add -Ddebug=true
-  ;;
-  --disable-debug-info) meson_option_add -Ddebug=false
-  ;;
   --enable-docs) docs=enabled
   ;;
   --disable-docs) docs=disabled
@@ -972,7 +968,6 @@ cat << EOF
   bsd-user        all BSD usermode emulation targets
   pie             Position Independent Executables
   debug-tcg       TCG debugging (default is disabled)
-  debug-info      debugging information
 
 NOTE: The object files are built at the place where configure is launched
 EOF
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py
index 4c7f13fdfc40..8d2e526132ae 100755
--- a/scripts/meson-buildoptions.py
+++ b/scripts/meson-buildoptions.py
@@ -36,6 +36,7 @@
     "b_coverage": "gcov",
     "b_lto": "lto",
     "coroutine_backend": "with-coroutine",
+    "debug": "debug-info",
     "malloc": "enable-malloc",
     "pkgversion": "with-pkgversion",
     "qemu_firmwarepath": "firmwarepath",
@@ -47,6 +48,7 @@
     "b_coverage",
     "b_lto",
     "datadir",
+    "debug",
     "includedir",
     "libdir",
     "libexecdir",
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index dd1c83f6f1b9..8030d63edd3a 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -11,6 +11,7 @@ meson_options_help() {
   printf "%s\n" '                           affects only QEMU, not tools like qemu-img)'
   printf "%s\n" '  --datadir=VALUE          Data file directory [share]'
   printf "%s\n" '  --disable-coroutine-pool coroutine freelist (better performance)'
+  printf "%s\n" '  --disable-debug-info     Enable debug symbols and other information'
   printf "%s\n" '  --disable-hexagon-idef-parser'
   printf "%s\n" '                           use idef-parser to automatically generate TCG'
   printf "%s\n" '                           code for the Hexagon frontend'
@@ -258,6 +259,8 @@ _meson_option_parse() {
     --datadir=*) quote_sh "-Ddatadir=$2" ;;
     --enable-dbus-display) printf "%s" -Ddbus_display=enabled ;;
     --disable-dbus-display) printf "%s" -Ddbus_display=disabled ;;
+    --enable-debug-info) printf "%s" -Ddebug=true ;;
+    --disable-debug-info) printf "%s" -Ddebug=false ;;
     --enable-debug-mutex) printf "%s" -Ddebug_mutex=true ;;
     --disable-debug-mutex) printf "%s" -Ddebug_mutex=false ;;
     --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=true ;;
-- 
2.40.1
Re: [PATCH 18/24] build: move --disable-debug-info to meson
Posted by Michael Tokarev 2 years, 6 months ago
11.05.2023 12:50, Paolo Bonzini wrote:
...
> +  printf "%s\n" '  --disable-debug-info     Enable debug symbols and other information'

Hmm? So is it disable or enable? ;)

/mjt