SCons: Add "execinfo" option to force linking libexecinfo

Fixes #20035.
This commit is contained in:
Rémi Verschelde 2018-07-22 19:03:36 +02:00
parent ad88979841
commit 8e4de57e56
1 changed files with 4 additions and 0 deletions

View File

@ -62,6 +62,7 @@ def get_opts():
EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
BoolVariable('touch', 'Enable touch events', True),
BoolVariable('execinfo', 'Use libexecinfo on systems where glibc is not available', False),
]
@ -284,6 +285,9 @@ def configure(env):
env.Append(LIBS=['dl'])
if (platform.system().find("BSD") >= 0):
env["execinfo"] = True
if env["execinfo"]:
env.Append(LIBS=['execinfo'])
## Cross-compilation