1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/lib/util/wscript
Andrew Bartlett 14feb93d48 lib/util: Prefer backtrace_symbols() for internal backtraces
Backtraces when Samba is in PANIC state are better with
backtrace_symbols() than with libunwind on Ubuntu 20.04 x86_64
so move libunwind to a off-by-default option, prompted for
if backtrace_symbols() is not available.

Based on a request by Fco Javier Felix <ffelix@inode64.com>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-06-09 22:49:29 +00:00

33 lines
1.5 KiB
Python

def options(opt):
''' This is a bit strange, but disable is the flag, not enable. '''
opt.add_option('--disable-fault-handling', action='store_true', dest='disable_fault_handling', help=('disable the fault handlers'), default=False)
# We do not want libunwind by default (backtrace_symbols() in
# glibc is better) but allow (eg) IA-64 to build with it where it
# might be better (per old comment in fault.c)
opt.samba_add_onoff_option('libunwind',
default=None,
help='''Use libunwind instead of the default backtrace_symbols()
from libc, for example on IA-64 where it might give a better
backtrace.''')
opt.add_option('--with-systemd',
help=("Enable systemd integration"),
action='store_true', dest='enable_systemd')
opt.add_option('--without-systemd',
help=("Disable systemd integration"),
action='store_false', dest='enable_systemd')
opt.add_option('--with-lttng',
help=("Enable lttng integration"),
action='store_true', dest='enable_lttng')
opt.add_option('--without-lttng',
help=("Disable lttng integration"),
action='store_false', dest='enable_lttng')
opt.add_option('--with-gpfs',
help=("Directory under which gpfs headers are installed"),
action="store", dest='gpfs_headers_dir')