[Mesa-dev] Announcement: Meson build type change

Eric Engestrom eric.engestrom at imgtec.com
Tue Nov 7 13:47:22 UTC 2017


(adding cc:mesa-dev back)

On Tuesday, 2017-11-07 13:52:59 +0100, Ernst Sjöstrand wrote:
> Did you consider using -Og for debugoptimized?
> I have now idea exactly how good it is, just wanted to point it out so
> you didn't miss it!

It's better than -O2 for a debug build, but it's also not something that
can be controlled by the Meson script in Mesa.

Meson devs are now aware of -Og, and Meson might automatically use -Og
when supported for `debugoptimized` builds in the future, but it's not
something it can do right now.

That said, I tried using it at $DAYJOB to have faster debug builds, but
I've found that it still optimises out many variables for instance,
making debugging quite a pain. I think it would be a good fit for
`debugoptimized`, but I wouldn't want `debug` to have anything other
than -O0.

> 
> Regards
> //Ernst
> 
> 2017-11-07 13:25 GMT+01:00 Eric Engestrom <eric.engestrom at imgtec.com>:
> > Hi all,
> >
> > As a result of the discussion that started with this message:
> > https://lists.freedesktop.org/archives/mesa-dev/2017-November/175104.html
> >
> > The default build type for Meson builds has been changed to
> > `debugoptimized` in commit d5597f09c6a18a3ed2dd [1].
> >
> > For you devs, this means that some debug information will now be missing
> > if you use the default build type, due to the -O2 optimisations.
> > You can set the build type by giving `meson` or `meson configure` the
> > additional `-D buildtype=debug` option.
> >
> > (Note that existing build dirs are not affected, as Meson only uses the
> > default values during the first initialisation, and stores them for
> > subsequent invocations.)
> >
> > Also note that asserts are not automatically disabled on release builds,
> > but are controlled by an independent option, `b_ndebug`, defaulting to
> > `false`. Setting this option to `true` means "compile asserts out".
> > Custom assertion code should be compiled based on the standard NDEBUG
> > (which assert() uses), not Mesa's internal DEBUG.
> >
> > If you have any question regarding Meson, Dylan and I will probably be
> > able to help you, so don't hesitate to ask :)
> >
> > Cheers,
> >   Eric
> >
> > [1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=d5597f09c6a18a3ed2dd76657dd2e60806a6e4b2
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list