On Wed, Apr 28, 2021 at 10:07 PM Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > > On 4/28/21 9:55 PM, Joelle van Dyne wrote: > > Meson defaults builds to 'debugoptimized' which adds '-g -O2' > > to CFLAGS. If the user specifies '--disable-debug-info' we > > should instead build with 'release' which does not emit any > > debug info. > > > > Signed-off-by: Joelle van Dyne <j...@getutm.app> > > --- > > configure | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/configure b/configure > > index 4f374b4889..5c3568cbc3 100755 > > --- a/configure > > +++ b/configure > > @@ -6398,6 +6398,7 @@ NINJA=$ninja $meson setup \ > > --sysconfdir "$sysconfdir" \ > > --localedir "$localedir" \ > > --localstatedir "$local_statedir" \ > > + --buildtype $(if test "$debug_info" = yes; then echo > > "debugoptimized"; else echo "release"; fi) \ > > NAck. You are changing the default (which is 'debug') to 'release'.
I thought 'debugoptimized' was the default? From my build logs, there's always '-g -O2' which is why I needed to make this change. The default for 'debug_info' is yes so this keeps it on 'debugoptimized' and uses 'release' when explicitly disabling debug_info. > > This should be at least mentioned in the commit description, but > I don't think this is what we want here. 'release' enables -O3, > which is certainly not supported. The 'debug' profile is what we > have been and are testing. > > I'd be OK if you had used "debugoptimized else debug". > > The mainstream project would rather use 'debug'/'debugoptimized', or > 'minsize', which are already tested. We might consider allowing forks > to use 'plain' profile eventually. But the 'release' type is an > unsupported landmine IMHO. > > If you want to use something else, it should be an explicit argument > to ./configure, then you are on your own IMO. What do I need to avoid '-g'? -j > > Regards, > > Phil. >