mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
print backtraces on panic on mac and linux
This commit is contained in:

committed by
Alexander Medvednikov

parent
02fc7e14cd
commit
73c6bae480
@ -39,6 +39,11 @@ fn (v mut V) cc() {
|
||||
else {
|
||||
a << '-g'
|
||||
}
|
||||
|
||||
if v.pref.is_debug {
|
||||
a << ' -rdynamic ' // needed for nicer symbolic backtraces
|
||||
}
|
||||
|
||||
if v.os != .msvc && v.os != .freebsd {
|
||||
a << '-Werror=implicit-function-declaration'
|
||||
}
|
||||
|
@ -21,6 +21,15 @@ CommonCHeaders = '
|
||||
#include <execinfo.h> // backtrace and backtrace_symbols_fd
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <execinfo.h> // backtrace and backtrace_symbols_fd
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h> // os__wait uses wait on nix
|
||||
#endif
|
||||
|
||||
|
||||
#define EMPTY_STRUCT_DECLARATION
|
||||
#define OPTION_CAST(x) (x)
|
||||
|
Reference in New Issue
Block a user