[Mesa-dev] Meson's default build type

Eero Tamminen eero.t.tamminen at intel.com
Mon Nov 6 12:25:15 UTC 2017


Hi,

On 04.11.2017 03:28, Christian Schmidbauer wrote:
>> On Thu, Nov 2, 2017 at 11:45 AM, Andres Rodriguez <andresx7 at gmail.com> wrote:
[...]
>> In the autotools system we have today, we have --enable-debug, which
>> adds -g and -O0 if some -g* and -O* are not already in CFLAGS. It also
>> adds -DDEBUG which turns on lots of debugging code that has extra
>> runtime cost, like nir_validate. Without --enable-debug, we pass
>> -DNDEBUG to disable assertions, and otherwise use autotools' default
>> CFLAGS (-g -O2) or whatever the user specified.
>>
>> Meson's debug build should correspond to --enable-debug.
>> debugoptimized vs release is a little less obvious. Perhaps
>> debugoptimized should default to -g -O2 but leave assertions enabled,
>> and release should default to -g -O2 -DNDEBUG?
>>
>> Under that system, I agree that the default build type should be debugoptimized.
> 
> Does this mean that it is not easily possible to keep asserations in
> general but remove heavy extra runtime cost (like nir_validate)?
> 
> FWIW, it would be great if there would be a "debugoptimized" which
> tries to keep the overhead minimal and still allow debugging in a
> sensible, but not complete, way.

I'd like that too.


	- Eero



More information about the mesa-dev mailing list