[v1] meson: Add `libdw` option to control libdw dependency
diff mbox series

Message ID 20260130090819.1511202-1-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1] meson: Add `libdw` option to control libdw dependency
Related show

Commit Message

Barnabás Pőcze Jan. 30, 2026, 9:08 a.m. UTC
Previously it was not possible to disable libdw usage if it was
detected. Fix that by adding a meson feature option.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 meson_options.txt              | 5 +++++
 src/libcamera/base/meson.build | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/meson_options.txt b/meson_options.txt
index d600cd1be..8121cf5d2 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('libdw',
+        type : 'feature',
+        value : 'auto',
+        description : 'Enable libdw integration for backtrace symbolization')
+
 option('libunwind',
         type : 'feature',
         value : 'auto',
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index bcf37f71c..b57774f49 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -26,7 +26,7 @@  libcamera_base_internal_sources = files([
     'utils.cpp',
 ])
 
-libdw = dependency('libdw', required : false)
+libdw = dependency('libdw', required : get_option('libdw'))
 libunwind = dependency('libunwind', required : get_option('libunwind'))
 
 if cc.has_header_symbol('execinfo.h', 'backtrace')