meson: disable -Werror=thread-safety on FreeBSD

Annotated <pthread.h> exposes too many errors in Mesa that are
non-trivial to fix and keep working without FreeBSD CI.

Fixes: 0d5fe24c9b ("macros: Add thread-safety annotation macros")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9168>
This commit is contained in:
Jan Beich 2021-02-20 12:30:56 +00:00 committed by Marge Bot
parent 37d6ce4ebb
commit 60b7c3a0f4

View File

@ -1131,7 +1131,6 @@ else
'-Werror=incompatible-pointer-types',
'-Werror=int-conversion',
'-Wimplicit-fallthrough',
'-Werror=thread-safety',
'-Wno-missing-field-initializers',
'-Wno-format-truncation',
'-fno-math-errno',
@ -1143,6 +1142,10 @@ else
if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
_trial += ['-Werror=format', '-Wformat-security']
endif
# FreeBSD annotated <pthread.h> but Mesa isn't ready
if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
_trial += ['-Werror=thread-safety']
endif
foreach a : _trial
if cc.has_argument(a)
c_args += a