[sysprof] build: make libunwind optional
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] build: make libunwind optional
- Date: Mon, 17 Feb 2020 20:05:51 +0000 (UTC)
commit e06638d665e1b4ac85feea88c53113cb877c460d
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 17 12:02:44 2020 -0800
build: make libunwind optional
meson.build | 8 +++++---
meson_options.txt | 3 +++
src/libsysprof/preload/meson.build | 5 ++++-
3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 13ef5a4..231445d 100644
--- a/meson.build
+++ b/meson.build
@@ -89,9 +89,11 @@ if cc.has_header('execinfo.h')
config_h.set10('HAVE_EXECINFO_H', true)
endif
-libunwind_dep = dependency('libunwind-generic', required: false)
-if libunwind_dep.found()
- config_h.set10('ENABLE_LIBUNWIND', libunwind_dep.found())
+if get_option('libunwind')
+ libunwind_dep = dependency('libunwind-generic', required: false)
+ if libunwind_dep.found()
+ config_h.set10('ENABLE_LIBUNWIND', libunwind_dep.found())
+ endif
endif
# Development build setup
diff --git a/meson_options.txt b/meson_options.txt
index f30c783..623945c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,3 +29,6 @@ option('debugdir', type: 'string',
# If Yelp documentation should be installed
option('help', type: 'boolean')
+
+# Disable use of libunwind
+option('libunwind', type: 'boolean')
diff --git a/src/libsysprof/preload/meson.build b/src/libsysprof/preload/meson.build
index 596fc79..91b09a0 100644
--- a/src/libsysprof/preload/meson.build
+++ b/src/libsysprof/preload/meson.build
@@ -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',
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]