Mesa (master): meson: add opt-out of libunwind

Erik Faye-Lund kusma at kemper.freedesktop.org
Wed Oct 25 12:05:53 UTC 2017


Module: Mesa
Branch: master
Commit: 9e5a5a11ed93637fe28735e3dd161e59c4c3e5d0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e5a5a11ed93637fe28735e3dd161e59c4c3e5d0

Author: Erik Faye-Lund <kusmabite at gmail.com>
Date:   Mon Oct 23 20:54:03 2017 +0200

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 at gmail.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

---

 meson.build       | 3 ++-
 meson_options.txt | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 8db4699ec5..4d4f164087 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')
@@ -687,7 +688,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 1b90f5ced8..b44c93df00 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,




More information about the mesa-commit mailing list