On 14 April 2015 at 13:27, Marek Olšák <mar...@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 ?


-Emil


> Marek
>
> On Tue, Apr 14, 2015 at 2:13 PM, Emil Velikov <emil.l.veli...@gmail.com> 
> wrote:
>> Hi Marek
>>
>> On 13 April 2015 at 21:06, Marek Olšák <mar...@gmail.com> wrote:
>>> From: Marek Olšák <marek.ol...@amd.com>
>>>
>>> ---
>>>  configure.ac | 11 ++++++++++-
>>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 6ccf3b4..f5eeb7d 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -402,6 +402,13 @@ AC_ARG_ENABLE([debug],
>>>      [enable_debug="$enableval"],
>>>      [enable_debug=no]
>>>  )
>>> +AC_ARG_ENABLE([assertions],
>>> +    [AS_HELP_STRING([--enable-assertions],
>>> +        [add debug definitions to enable assertions and other debug checks 
>>> @<:@default=disabled@:>@])],
>> Can we keep this only for asserts (NDEBUG) as the name suggests ?
>> Otherwise things might get bit too messy when combining with
>> --enable-debug. Especially since most places of mesa reply on DEBUG,
>> while the asserts definition depends on NDEBUG.
>>
>> Thanks
>> Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to