Fix stacktrace on bazel build. (#347)
We need at least following defs to be set to print stacktrace in failure signal handler. - HAVE_UNWIND_H: on Linux and macOS. unwind.h is usually present by default on those OSes. - HAVE_DLADDR: on macOS. Windows is not cared because glog can not be built with bazel on Windows today.
This commit is contained in:
parent
96a2f23dca
commit
6ca3d3cf58
@ -73,7 +73,16 @@ def glog_library(namespace='google', with_gflags=1, **kwargs):
|
|||||||
|
|
||||||
# Include generated header files.
|
# Include generated header files.
|
||||||
'-I%s/glog_internal' % gendir,
|
'-I%s/glog_internal' % gendir,
|
||||||
] + ([
|
] + select({
|
||||||
|
# For stacktrace.
|
||||||
|
'@bazel_tools//src/conditions:darwin': [
|
||||||
|
'-DHAVE_UNWIND_H',
|
||||||
|
'-DHAVE_DLADDR',
|
||||||
|
],
|
||||||
|
'//conditions:default': [
|
||||||
|
'-DHAVE_UNWIND_H',
|
||||||
|
],
|
||||||
|
}) + ([
|
||||||
# Use gflags to parse CLI arguments.
|
# Use gflags to parse CLI arguments.
|
||||||
'-DHAVE_LIB_GFLAGS',
|
'-DHAVE_LIB_GFLAGS',
|
||||||
] if with_gflags else []),
|
] if with_gflags else []),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user