3rdparty: libbacktrace: properly disable it on win32, nswitch and psvita
This commit is contained in:
parent
c1a96d3ff1
commit
6087d43043
1 changed files with 5 additions and 0 deletions
5
3rdparty/libbacktrace/wscript
vendored
5
3rdparty/libbacktrace/wscript
vendored
|
@ -62,10 +62,12 @@ def options(opt):
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
# add unsupported platforms here
|
# add unsupported platforms here
|
||||||
if conf.env.DEST_OS in ['nswitch', 'psvita', 'dos']:
|
if conf.env.DEST_OS in ['nswitch', 'psvita', 'dos']:
|
||||||
|
conf.env.DISABLE_LIBBACKTRACE = True
|
||||||
return
|
return
|
||||||
|
|
||||||
# win32 has it's own dbghelp-based backtrace, that's why we ship PDBs
|
# win32 has it's own dbghelp-based backtrace, that's why we ship PDBs
|
||||||
if conf.env.COMPILER_CC == 'msvc':
|
if conf.env.COMPILER_CC == 'msvc':
|
||||||
|
conf.env.DISABLE_LIBBACKTRACE = True
|
||||||
return
|
return
|
||||||
|
|
||||||
if not conf.path.find_dir('libbacktrace') or not conf.path.find_dir('libbacktrace/config'):
|
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)]
|
task.env.CFLAGS += ['-frandom-seed=%s' % out.path_from(out.ctx.bldnode)]
|
||||||
|
|
||||||
def build(bld):
|
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
|
# 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']
|
sources = ['atomic.c', 'dwarf.c', 'fileline.c', 'posix.c', 'print.c', 'sort.c', 'state.c', 'backtrace.c', 'simple.c', 'mmap.c', 'mmapio.c']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue