On 11/4/21 8:38 PM, Max Kellermann wrote:
On 2021/11/04 19:32, kaliko <kal...@azylum.org> wrote:
I had a look at the 0.23.3-1 build and actually debhelper calls meson with
"--wrap-mode=nodownload --buildtype=plain --prefix=/usr …" plus some *dir
options [2]. Then indeed asserts are not disabled but it's not really a
debug build either in meson terminology at least [0].

It's a debug build if debug options are enabled.  There's are two generic
Meson debug options […]

Thanks for your answer Max :)

Then I believe setting NDEBUG (either at meson level with "b_ndebug=true" or within "DEB_CXXFLAGS_MAINT_APPEND") will lead to the same result as meson options "--buildtype=debugoptimized -Db_ndebug=true" since dpkg-buildflags already set "-g -O2".

What do you think of this Florian?

I am MPD upstream, and I do not just "consider" that, but it's an
undisputable fact.

Sorry for my wording Max, I did not meant to question or doubt your expertise. I'm made a build and regarding runtime exe size the gain is significant: ~1.8MB → ~1.6MB.

[…]
IMHO all Debian packages should build with NDEBUG, so this should
really be a central debhelper feature.

This has been raised before:

   https://lists.debian.org/debian-devel/2013/02/msg00124.html
   https://lists.debian.org/debian-mentors/2018/04/msg00244.html

It's not even in meson/ninja debhelper implementation (as I thought) but actually in global build options exposed by dpkg.
Why dpkg-buildflags does not expose "-DNDEBUG"?
I believe there are no consensus in Debian community (cf. 2013 mail above) or, surprisingly, this has yet to be addressed in the project.

But that's beyond the scope of this report and MPD packaging…

k.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to