meson: Add option to disable libunwind integration

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 <dylan.aissi@collabora.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Longer commit message lines, reworded meson option description.]
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
Dylan Aïssi
2025-09-24 12:39:42 +02:00
committed by Barnabás Pőcze
parent 5ca7afd2d3
commit 22f6edc686
2 changed files with 6 additions and 1 deletions

View File

@@ -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'],

View File

@@ -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)