darwin: Use the system libunwind

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507>
This commit is contained in:
Jeremy Huddleston Sequoia 2021-01-14 10:08:34 -08:00 committed by Marge Bot
parent 08ac7b52e7
commit 766538f83c
1 changed files with 5 additions and 1 deletions

View File

@ -1735,7 +1735,11 @@ elif _libunwind == 'false'
warning('libunwind option "false" deprecated, please use "disabled" instead.')
endif
if _libunwind != 'disabled' and not with_platform_android
dep_unwind = dependency('libunwind', required : _libunwind == 'enabled')
if host_machine.system() == 'darwin'
dep_unwind = meson.get_compiler('c').find_library('System')
else
dep_unwind = dependency('libunwind', required : _libunwind == 'enabled')
endif
if dep_unwind.found()
pre_args += '-DHAVE_LIBUNWIND'
endif