build: make libunwind optional

This commit is contained in:
Christian Hergert
2020-02-17 12:02:44 -08:00
parent ee5c43f107
commit e06638d665
3 changed files with 12 additions and 4 deletions

View File

@ -1,9 +1,12 @@
libsysprof_memory_preload_deps = [
cc.find_library('dl', required: false),
libsysprof_capture_dep,
libunwind_dep,
]
if get_option('libunwind')
libsysprof_memory_preload_deps += [libunwind_dep]
endif
libsysprof_memory_preload_sources = [
'sysprof-memory-collector.c',
]