feat(bazel): enable symbolization (#1116)
Symbolization support on Linux and BSD requires link.h which is usually provided by the GNU C Library (glibc). Assume the header to be present at all times by unconditionally defining HAVE_SYMBOLIZE on the corresponding platforms.
This commit is contained in:
parent
9ca8073cb2
commit
175b54d4fa
@ -91,12 +91,14 @@ def glog_library(with_gflags = 1, **kwargs):
|
|||||||
# Enable declaration of _Unwind_Backtrace
|
# Enable declaration of _Unwind_Backtrace
|
||||||
"-D_GNU_SOURCE",
|
"-D_GNU_SOURCE",
|
||||||
"-DHAVE_LINK_H",
|
"-DHAVE_LINK_H",
|
||||||
|
"-DHAVE_SYMBOLIZE", # Supported by <link.h>
|
||||||
]
|
]
|
||||||
|
|
||||||
linux_only_copts = [
|
linux_only_copts = [
|
||||||
# For utilities.h.
|
# For utilities.h.
|
||||||
"-DHAVE_EXECINFO_H",
|
"-DHAVE_EXECINFO_H",
|
||||||
"-DHAVE_LINK_H",
|
"-DHAVE_LINK_H",
|
||||||
|
"-DHAVE_SYMBOLIZE", # Supported by <link.h>
|
||||||
]
|
]
|
||||||
|
|
||||||
darwin_only_copts = [
|
darwin_only_copts = [
|
||||||
|
|||||||
@ -77,6 +77,10 @@
|
|||||||
# error "symbolize.h" was not included correctly.
|
# error "symbolize.h" was not included correctly.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We prefer to let the build system detect the availability of certain features
|
||||||
|
// such as symbolization support. HAVE_SYMBOLIZE should therefore be defined by
|
||||||
|
// the build system in general unless there is a good reason to perform the
|
||||||
|
// detection using the preprocessor.
|
||||||
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
||||||
# ifndef HAVE_SYMBOLIZE
|
# ifndef HAVE_SYMBOLIZE
|
||||||
// defined by gcc
|
// defined by gcc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user