From 22f6edc686c86904c3843ec19c8af5ba19c93298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dylan=20A=C3=AFssi?= Date: Wed, 24 Sep 2025 12:39:42 +0200 Subject: [PATCH] meson: Add option to disable libunwind integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While optional, libunwind integration is enabled when meson finds it without having a way to disable it. This is the case for Debian where libunwind is installed by build dependencies. Since we want to reduce dependencies on libunwind in Debian due to several issues with it[0], we need an option to control its activation. [0]: https://bugs.debian.org/1093688 Signed-off-by: Dylan Aïssi Reviewed-by: Kieran Bingham Reviewed-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart [Longer commit message lines, reworded meson option description.] Signed-off-by: Barnabás Pőcze --- meson_options.txt | 5 +++++ src/libcamera/base/meson.build | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index 2104469e..c052e85a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -42,6 +42,11 @@ option('lc-compliance', value : 'auto', description : 'Compile the lc-compliance test application') +option('libunwind', + type : 'feature', + value : 'auto', + description : 'Enable libunwind integration for backtrace generation') + option('pipelines', type : 'array', value : ['auto'], diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build index a742dfdf..bcf37f71 100644 --- a/src/libcamera/base/meson.build +++ b/src/libcamera/base/meson.build @@ -27,7 +27,7 @@ libcamera_base_internal_sources = files([ ]) libdw = dependency('libdw', required : false) -libunwind = dependency('libunwind', required : false) +libunwind = dependency('libunwind', required : get_option('libunwind')) if cc.has_header_symbol('execinfo.h', 'backtrace') config_h.set('HAVE_BACKTRACE', 1)