summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-02-13 15:18:59 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-02-24 16:16:23 -0300
commitd6dba3fd6fa84bd24705ca72da824edc4af989e7 (patch)
treea114bcb16c535e6b0c94573ff47dcf3e169f65a9 /meson.build
parent3a3d688c33abce75f216333e3c00d46f6b3414e5 (diff)
meson: Add an option to disable usage of libunwind
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778193
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 17 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index 9f4476cfe..e7d219b8d 100644
--- a/meson.build
+++ b/meson.build
@@ -275,20 +275,24 @@ if host_machine.system() == 'windows'
platform_deps = [cc.find_library('ws2_32')]
endif
-unwind_dep = dependency('libunwind', required : false)
-dw_dep = dependency('libdw', required: false)
-if unwind_dep.found()
- cdata.set('HAVE_UNWIND', 1)
- if dw_dep.found()
- cdata.set('HAVE_DW', 1)
- else
- message('Support for backtraces is partial only.')
- endif
-else
- if cc.has_function('backtrace')
- cdata.set('HAVE_BACKTRACE', 1)
+backtrace_deps = []
+if not get_option('disable_libunwind')
+ unwind_dep = dependency('libunwind', required : false)
+ dw_dep = dependency('libdw', required: false)
+ backtrace_deps = [unwind_dep, dw_dep]
+ if unwind_dep.found()
+ cdata.set('HAVE_UNWIND', 1)
+ if dw_dep.found()
+ cdata.set('HAVE_DW', 1)
+ else
+ message('Support for backtraces is partial only.')
+ endif
else
- message('NO backtraces support.')
+ if cc.has_function('backtrace')
+ cdata.set('HAVE_BACKTRACE', 1)
+ else
+ message('NO backtraces support.')
+ endif
endif
endif