meson: add opt-out of libunwind
Libunwind has some issues on some platforms, so let's allow people who have issues to opt-out. This is similar to what we do in automake, and the implementation is modelled after our opt-out for valgrind. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
d37bcf3cc2
commit
9e5a5a11ed
|
@ -37,6 +37,7 @@ pre_args = [
|
||||||
with_vulkan_icd_dir = get_option('vulkan-icd-dir')
|
with_vulkan_icd_dir = get_option('vulkan-icd-dir')
|
||||||
with_tests = get_option('build-tests')
|
with_tests = get_option('build-tests')
|
||||||
with_valgrind = get_option('valgrind')
|
with_valgrind = get_option('valgrind')
|
||||||
|
with_libunwind = get_option('libunwind')
|
||||||
with_asm = get_option('asm')
|
with_asm = get_option('asm')
|
||||||
with_llvm = get_option('llvm')
|
with_llvm = get_option('llvm')
|
||||||
if get_option('texture-float')
|
if get_option('texture-float')
|
||||||
|
@ -687,7 +688,7 @@ dep_selinux = []
|
||||||
# TODO: llvm-prefix and llvm-shared-libs
|
# TODO: llvm-prefix and llvm-shared-libs
|
||||||
|
|
||||||
dep_unwind = dependency('libunwind', required : false)
|
dep_unwind = dependency('libunwind', required : false)
|
||||||
if dep_unwind.found()
|
if dep_unwind.found() and with_libunwind
|
||||||
pre_args += '-DHAVE_LIBUNWIND'
|
pre_args += '-DHAVE_LIBUNWIND'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,12 @@ option(
|
||||||
value : true,
|
value : true,
|
||||||
description : 'Build with valgrind support if possible'
|
description : 'Build with valgrind support if possible'
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'libunwind',
|
||||||
|
type : 'boolean',
|
||||||
|
value : true,
|
||||||
|
description : 'Use libunwind for stack-traces if possible'
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'build-tests',
|
'build-tests',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
|
|
Loading…
Reference in New Issue