Make it easier to turn off the use of libstacktrace

This commit is contained in:
Zahary Karadjov 2020-06-04 16:36:44 +03:00 committed by zah
parent 6e88a07b51
commit 76b44c73f3
1 changed files with 11 additions and 4 deletions

View File

@ -43,15 +43,22 @@ else:
switch("import", "testutils/moduletests")
const useLibStackTrace = not defined(macosx) and
not (defined(windows) and defined(i386)) and
not defined(disable_libbacktrace)
when useLibStackTrace:
--define:nimStackTraceOverride
switch("import", "libbacktrace")
else:
--stacktrace:on
--linetrace:on
# the default open files limit is too low on macOS (512), breaking the
# "--debugger:native" build. It can be increased with `ulimit -n 1024`.
if not defined(macosx):
# add debugging symbols and original files and line numbers
--debugger:native
if not (defined(windows) and defined(i386)) and not defined(disable_libbacktrace):
# light-weight stack traces using libbacktrace and libunwind
--define:nimStackTraceOverride
switch("import", "libbacktrace")
--define:nimOldCaseObjects # https://github.com/status-im/nim-confutils/issues/9