From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2] meson.build: default to -gsplit-dwarf for debug info
Date: Thu, 06 Mar 2025 12:20:25 +0000 [thread overview]
Message-ID: <877c524agm.fsf@draig.linaro.org> (raw)
In-Reply-To: <CABgObfZpf7Oki+0rH-3OTBLF_cW8+5e-jAaG=AU58oAn8CP=5w@mail.gmail.com> (Paolo Bonzini's message of "Thu, 6 Mar 2025 12:36:40 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> Il gio 6 mar 2025, 11:53 Alex Bennée <alex.bennee@linaro.org> ha scritto:
>
> -option_cflags = (get_option('debug') ? ['-g'] : [])
> +option_cflags = []
> +if get_option('debug')
> + option_cflags += get_option('split_debug') ? ['-gsplit-dwarf'] : ['-g']
> +endif
>
> option_cflags does nothing, it's only for clarity in the final summary. So you need
>
> if get_option('debug') and get_option('split_debug')
> qemu_cflags += '-gsplit-dwarf'
> endif
Should I update the optimization field as well? is this the reason why I
wasn't seeing changes occur for the tests that meson builds?
>
> (I wonder if it should be implemented in meson instead... It should be beneficial for other projects surely).
>
> Paolo
>
> if get_option('optimization') != 'plain'
> option_cflags += ['-O' + get_option('optimization')]
> endif
> diff --git a/meson_options.txt b/meson_options.txt
> index 59d973bca0..3432123fee 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -362,6 +362,8 @@ option('debug_mutex', type: 'boolean', value: false,
> description: 'mutex debugging support')
> option('debug_stack_usage', type: 'boolean', value: false,
> description: 'measure coroutine stack usage')
> +option('split_debug', type: 'boolean', value: true,
> + description: 'split debug info from object files')
> option('qom_cast_debug', type: 'boolean', value: true,
> description: 'cast debugging support')
> option('slirp_smbd', type : 'feature', value : 'auto',
> diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
> index 3e8e00852b..aca6e68830 100644
> --- a/scripts/meson-buildoptions.sh
> +++ b/scripts/meson-buildoptions.sh
> @@ -504,6 +504,8 @@ _meson_option_parse() {
> --disable-strict-rust-lints) printf "%s" -Dstrict_rust_lints=false ;;
> --enable-strip) printf "%s" -Dstrip=true ;;
> --disable-strip) printf "%s" -Dstrip=false ;;
> + --enable-split-debug) printf "%s" -Dsplit_debug=true ;;
> + --disable-split-debug) printf "%s" -Dsplit_debug=false ;;
> --sysconfdir=*) quote_sh "-Dsysconfdir=$2" ;;
> --enable-tcg) printf "%s" -Dtcg=enabled ;;
> --disable-tcg) printf "%s" -Dtcg=disabled ;;
> --
> 2.39.5
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-03-06 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 10:53 [PATCH v2] meson.build: default to -gsplit-dwarf for debug info Alex Bennée
2025-03-06 10:57 ` Daniel P. Berrangé
2025-03-06 11:36 ` Paolo Bonzini
2025-03-06 12:20 ` Alex Bennée [this message]
2025-03-06 13:38 ` Paolo Bonzini
2025-03-06 14:42 ` Alex Bennée
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=877c524agm.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--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).