libdw support is optional
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Sat, 24 Nov 2018 02:22:21 +0000 (21:22 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 30 Nov 2018 01:56:10 +0000 (20:56 -0500)
This was no longer optional, leading to deadcode. This regression was
found trying to fix the unwind variant in cerbero.

meson.build
meson_options.txt

index 739d942..3d09d29 100644 (file)
@@ -347,7 +347,7 @@ endif
 
 backtrace_deps = []
 unwind_dep = dependency('libunwind', required : get_option('libunwind'))
-dw_dep = dependency('libdw', required: get_option('libunwind'))
+dw_dep = dependency('libdw', required: get_option('libdw'))
 backtrace_deps = [unwind_dep, dw_dep]
 if unwind_dep.found()
   cdata.set('HAVE_UNWIND', 1)
index cd5bead..50445af 100644 (file)
@@ -20,6 +20,7 @@ option('memory-alignment', type: 'combo',
 # Feature options
 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
 option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces')
+option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
 option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
 
 # Common feature options