[Mesa-dev] [PATCH] meson: add opt-out of libunwind

Erik Faye-Lund kusmabite at gmail.com
Wed Oct 25 07:13:03 UTC 2017


On Wed, Oct 25, 2017 at 8:10 AM, Gert Wollny <gw.fossdev at gmail.com> wrote:
> Am Dienstag, den 24.10.2017, 16:44 +0200 schrieb Erik Faye-Lund:
>>
>>  dep_unwind = dependency('libunwind', required : false)
>> -if dep_unwind.found()
>> +if dep_unwind.found() and with_libunwind
>>    pre_args += '-DHAVE_LIBUNWIND'
>>  endif
> Wouldn't it be better to do something like
>
> <<<
> if with_libunwind
>   dep_unwind = dependency('libunwind', required : false)
>   if dep_unwind.found()
>     pre_args += '-DHAVE_LIBUNWIND'
>   endif
> endif
>>>>
>
> to avoid looking for the library altogether when it is disabled?

Yeah, perhaps. I considered that, but decided against introducing a
new style just for this reason, so I followed the way this was already
done for valgrind. If someone wants to optimize this, it could be done
as a follow-up IMO. For now, I'd prefer to get the build working again
;)

> One could even think about requiring libunwind if it is not explicitely
>  disabled.

Yes. That would require using a tri-state config-option, I've seen
some discussions about this on #dri-devel. Same as with the above, I
think that can land later.


More information about the mesa-dev mailing list