From 6087d43043b7b817e68fd43406992e27d49b7c85 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 9 Feb 2025 15:55:12 +0300 Subject: [PATCH] 3rdparty: libbacktrace: properly disable it on win32, nswitch and psvita --- 3rdparty/libbacktrace/wscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/3rdparty/libbacktrace/wscript b/3rdparty/libbacktrace/wscript index 6fdb064d..89db747e 100644 --- a/3rdparty/libbacktrace/wscript +++ b/3rdparty/libbacktrace/wscript @@ -62,10 +62,12 @@ def options(opt): def configure(conf): # add unsupported platforms here if conf.env.DEST_OS in ['nswitch', 'psvita', 'dos']: + conf.env.DISABLE_LIBBACKTRACE = True return # win32 has it's own dbghelp-based backtrace, that's why we ship PDBs if conf.env.COMPILER_CC == 'msvc': + conf.env.DISABLE_LIBBACKTRACE = True return if not conf.path.find_dir('libbacktrace') or not conf.path.find_dir('libbacktrace/config'): @@ -159,6 +161,9 @@ def process_frandom_seed(ctx): task.env.CFLAGS += ['-frandom-seed=%s' % out.path_from(out.ctx.bldnode)] def build(bld): + if bld.env.DISABLE_LIBBACKTRACE: + return + # we specifically only want mmap-based allocators because calling malloc is not safe from signal handlers sources = ['atomic.c', 'dwarf.c', 'fileline.c', 'posix.c', 'print.c', 'sort.c', 'state.c', 'backtrace.c', 'simple.c', 'mmap.c', 'mmapio.c']