[Mesa-dev] [PATCH 2/2] configure.ac: add --enable-assertions

Marek Olšák maraeo at gmail.com
Tue Apr 14 06:52:52 PDT 2015


On Tue, Apr 14, 2015 at 3:12 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 14 April 2015 at 13:27, Marek Olšák <maraeo at gmail.com> wrote:
>> If --enable-debug is used, --enable-assertions is ignored.
>> --enable-assertions is basically a weaker version of --enable-debug.
>>
> Doesn't this make things more counter-intuitive ? I'm guilty of making
> --enable-debug a bit messy (and I'm ok with reverting it), but please
> don't take it as a role model.
>
>> There are 2 assert definitions in Mesa:
>> - The one that is enabled if DEBUG is defined (gallium only).
> Hmm nice. Seem that we can wrap it in ifndef NDEBUG ... else ... endif
> without breaking existing users.
>
>> - The one that is enabled if NDEBUG is not defined (the standard version).
>>
>> Both conditions must be met for assertions to be enabled everywhere.
>>
>> If somebody wants to remove the gallium assert in favor of the
>> standard one, then be it, but that's beyond the scope of this patch.
>>
> Suspecting that removing it might be out of the question, although the
> above suggestion should just work for everyone. What do you think ?

I wouldn't like to lose other debug checking that depends on DEBUG.

BTW, I no longer need this patch. It seems --enable-debug doesn't
disable optimizations by default, so I will use that. This issue is
closed.

Marek


More information about the mesa-dev mailing list