[Mesa-dev] Mesa (master): scons: Make debug build default.
jfonseca at vmware.com
Tue Apr 13 03:30:32 PDT 2010
On Tue, 2010-04-13 at 02:12 -0700, Michel Dänzer wrote:
> On Sun, 2010-04-11 at 01:23 -0700, Jose Fonseca wrote:
> > Module: Mesa
> > Branch: master
> > Commit: 21780adc2ed1b10c5c4c71427b8212b8464d065d
> > URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=21780adc2ed1b10c5c4c71427b8212b8464d065d
> > Author: José Fonseca <jfonseca at vmware.com>
> > Date: Sat Apr 10 02:44:52 2010 +0100
> > scons: Make debug build default.
> > I've been back and forth on this, but I believe it's worth to have debug
> > by default.
> > Most humans (developers, testers) will want to use the debug version by
> > default. Many build bots want release but they are bots, and humans >
> > bots, so I don't care that much.
> > This is part of my initiative of minimizing the scons option mess many
> > complain about.
> I wonder if a single boolean option is expressive enough for this
> though. E.g., with the traditional DRI drivers, I can build with
> --enable-debug and get more or less the same performance but some
> debugging features such as assertions. scons debug=1 tends to incur
> much more overhead, making it impractical to have it enabled for builds
> being used on a day-to-day basis.
>  Dave Airlie pointed out on IRC that assertions really shouldn't be
> restricted to 'debug' builds but should only be disabled for 'release'
> builds (with NDEBUG defined).
> So maybe there should be a separate 'release' option, and possibly
> several levels of debug. Not really sure what makes the most sense.
Yes, we could have the code optimization flags be controlled
independently from debugging checks via this separate option.
But what to do for the expensive debugging checks? There is no guarantee
that when the debugging checks are enabled the performance will be in
the same order.
Another problem is the build dir name. So far we have only
build/linux-x86 and build/x86-debug. Do we want different names for all
these combinations, and what should they be?
Built time with optimization + debug checks is as slow a optimization
without debug checks. For me having two seperate builds simultanously --
one for debuggin, which builds fast and has debugging checks, other for
performance which needs more time to build -- seems a better setup.
More information about the mesa-dev