mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-01 01:33:52 +00:00
meson: Add an option to disable usage of libunwind
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778193
This commit is contained in:
parent
3a3d688c33
commit
d6dba3fd6f
3 changed files with 23 additions and 16 deletions
|
@ -196,7 +196,7 @@ if libtype != 'shared'
|
||||||
include_directories('parse')],
|
include_directories('parse')],
|
||||||
install : true,
|
install : true,
|
||||||
link_with : printf_lib,
|
link_with : printf_lib,
|
||||||
dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, unwind_dep, dw_dep] + platform_deps,
|
dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib] + backtrace_deps + platform_deps,
|
||||||
)
|
)
|
||||||
libgst = libgst_static
|
libgst = libgst_static
|
||||||
endif
|
endif
|
||||||
|
@ -215,8 +215,8 @@ if libtype != 'static'
|
||||||
include_directories('parse')],
|
include_directories('parse')],
|
||||||
link_with : printf_lib,
|
link_with : printf_lib,
|
||||||
install : true,
|
install : true,
|
||||||
dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep,
|
dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
|
||||||
unwind_dep, dw_dep] + platform_deps,
|
+ platform_deps,
|
||||||
vs_module_defs: vs_module_defs_dir + 'libgstreamer.def',
|
vs_module_defs: vs_module_defs_dir + 'libgstreamer.def',
|
||||||
)
|
)
|
||||||
libgst = libgst_shared
|
libgst = libgst_shared
|
||||||
|
|
30
meson.build
30
meson.build
|
@ -275,20 +275,24 @@ if host_machine.system() == 'windows'
|
||||||
platform_deps = [cc.find_library('ws2_32')]
|
platform_deps = [cc.find_library('ws2_32')]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
unwind_dep = dependency('libunwind', required : false)
|
backtrace_deps = []
|
||||||
dw_dep = dependency('libdw', required: false)
|
if not get_option('disable_libunwind')
|
||||||
if unwind_dep.found()
|
unwind_dep = dependency('libunwind', required : false)
|
||||||
cdata.set('HAVE_UNWIND', 1)
|
dw_dep = dependency('libdw', required: false)
|
||||||
if dw_dep.found()
|
backtrace_deps = [unwind_dep, dw_dep]
|
||||||
cdata.set('HAVE_DW', 1)
|
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
|
else
|
||||||
message('Support for backtraces is partial only.')
|
if cc.has_function('backtrace')
|
||||||
endif
|
cdata.set('HAVE_BACKTRACE', 1)
|
||||||
else
|
else
|
||||||
if cc.has_function('backtrace')
|
message('NO backtraces support.')
|
||||||
cdata.set('HAVE_BACKTRACE', 1)
|
endif
|
||||||
else
|
|
||||||
message('NO backtraces support.')
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,6 @@ option('library_format', type : 'combo', choices : ['shared', 'static', 'both'],
|
||||||
option('disable_introspection',
|
option('disable_introspection',
|
||||||
type : 'boolean', value : false,
|
type : 'boolean', value : false,
|
||||||
description : 'Whether to disable the introspection generation')
|
description : 'Whether to disable the introspection generation')
|
||||||
|
option('disable_libunwind',
|
||||||
|
type : 'boolean', value : false,
|
||||||
|
description : 'Whether to disable the usage of libunwind (to generate backtraces)')
|
||||||
|
|
Loading…
Reference in a new issue