Commit 6ca3d3cf authored by Shuhei Takahashi's avatar Shuhei Takahashi Committed by Fumitoshi Ukai

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.
parent 96a2f23d
......@@ -73,7 +73,16 @@ def glog_library(namespace='google', with_gflags=1, **kwargs):
# Include generated header files.
'-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.
'-DHAVE_LIB_GFLAGS',
] if with_gflags else []),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment