[Mesa-dev] [PATCH] meson: add opt-out of libunwind
Dylan Baker
dylan at pnwbakers.com
Tue Oct 24 17:11:06 UTC 2017
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Quoting Erik Faye-Lund (2017-10-24 07:44:21)
> 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 at gmail.com>
> ---
>
> This fixes a build-problem for me on Arch Linux for ARM. I've always
> needed to do the same using autotools also.
>
> meson.build | 3 ++-
> meson_options.txt | 6 ++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9f48122582..e842bb1652 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -37,6 +37,7 @@ pre_args = [
> with_vulkan_icd_dir = get_option('vulkan-icd-dir')
> with_tests = get_option('build-tests')
> with_valgrind = get_option('valgrind')
> +with_libunwind = get_option('libunwind')
> with_asm = get_option('asm')
> with_llvm = get_option('llvm')
> if get_option('texture-float')
> @@ -681,7 +682,7 @@ dep_selinux = []
> # TODO: llvm-prefix and llvm-shared-libs
>
> dep_unwind = dependency('libunwind', required : false)
> -if dep_unwind.found()
> +if dep_unwind.found() and with_libunwind
> pre_args += '-DHAVE_LIBUNWIND'
> endif
>
> diff --git a/meson_options.txt b/meson_options.txt
> index be93871d61..85b1cdaff6 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -143,6 +143,12 @@ option(
> description : 'Build with valgrind support if possible'
> )
> option(
> + 'libunwind',
> + type : 'boolean',
> + value : true,
> + description : 'Use libunwind for stack-traces if possible'
> +)
> +option(
> 'build-tests',
> type : 'boolean',
> value : false,
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171024/988531cf/attachment.sig>
More information about the mesa-dev
mailing list