mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-11 15:40:53 +00:00
build: make libunwind optional
This commit is contained in:
@ -89,9 +89,11 @@ if cc.has_header('execinfo.h')
|
|||||||
config_h.set10('HAVE_EXECINFO_H', true)
|
config_h.set10('HAVE_EXECINFO_H', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libunwind_dep = dependency('libunwind-generic', required: false)
|
if get_option('libunwind')
|
||||||
if libunwind_dep.found()
|
libunwind_dep = dependency('libunwind-generic', required: false)
|
||||||
config_h.set10('ENABLE_LIBUNWIND', libunwind_dep.found())
|
if libunwind_dep.found()
|
||||||
|
config_h.set10('ENABLE_LIBUNWIND', libunwind_dep.found())
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Development build setup
|
# Development build setup
|
||||||
|
|||||||
@ -29,3 +29,6 @@ option('debugdir', type: 'string',
|
|||||||
|
|
||||||
# If Yelp documentation should be installed
|
# If Yelp documentation should be installed
|
||||||
option('help', type: 'boolean')
|
option('help', type: 'boolean')
|
||||||
|
|
||||||
|
# Disable use of libunwind
|
||||||
|
option('libunwind', type: 'boolean')
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
libsysprof_memory_preload_deps = [
|
libsysprof_memory_preload_deps = [
|
||||||
cc.find_library('dl', required: false),
|
cc.find_library('dl', required: false),
|
||||||
libsysprof_capture_dep,
|
libsysprof_capture_dep,
|
||||||
libunwind_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if get_option('libunwind')
|
||||||
|
libsysprof_memory_preload_deps += [libunwind_dep]
|
||||||
|
endif
|
||||||
|
|
||||||
libsysprof_memory_preload_sources = [
|
libsysprof_memory_preload_sources = [
|
||||||
'sysprof-memory-collector.c',
|
'sysprof-memory-collector.c',
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user