aboutsummaryrefslogtreecommitdiff
path: root/scripts/meson-buildoptions.sh
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-04-20 17:33:58 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-07 07:46:58 +0200
commitc54b59ee0da90dfb169c05e43ebf0c01a7dd5215 (patch)
tree47370c8bd4ef2ca06e9c4403d935975bc361db94 /scripts/meson-buildoptions.sh
parentc09c1ce7e9507f8421b01076e1ed94b4c51d8f53 (diff)
meson: pass more options directly as -D
If an option is not used anywhere by the configure script, it can be just added to $meson_options even if it is not parsed by the automatically generated bits in scripts/meson-buildoptions.sh. The only slightly tricky case is $debug, where the if test "$fortify_source" = "yes" ; then QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" debug=no fi assignment is dead; configure sets fortify_source=no whenever debug=yes. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/meson-buildoptions.sh')
-rw-r--r--scripts/meson-buildoptions.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index f6a9b05c40..4b0770a9e0 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -27,7 +27,9 @@ meson_options_help() {
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'
+ printf "%s\n" ' --enable-gcov Enable coverage tracking.'
printf "%s\n" ' --enable-gprof QEMU profiling with gprof'
+ printf "%s\n" ' --enable-lto Use link time optimization'
printf "%s\n" ' --enable-malloc=CHOICE choose memory allocator to use [system] (choices:'
printf "%s\n" ' jemalloc/system/tcmalloc)'
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
@@ -182,6 +184,10 @@ _meson_option_parse() {
--disable-avx2) printf "%s" -Davx2=disabled ;;
--enable-avx512f) printf "%s" -Davx512f=enabled ;;
--disable-avx512f) printf "%s" -Davx512f=disabled ;;
+ --enable-gcov) printf "%s" -Db_coverage=true ;;
+ --disable-gcov) printf "%s" -Db_coverage=false ;;
+ --enable-lto) printf "%s" -Db_lto=true ;;
+ --disable-lto) printf "%s" -Db_lto=false ;;
--block-drv-ro-whitelist=*) quote_sh "-Dblock_drv_ro_whitelist=$2" ;;
--block-drv-rw-whitelist=*) quote_sh "-Dblock_drv_rw_whitelist=$2" ;;
--enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitelist_in_tools=true ;;