diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 286346b3a..ff54e2420 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -91,12 +91,14 @@ def glog_library(with_gflags = 1, **kwargs): # Enable declaration of _Unwind_Backtrace "-D_GNU_SOURCE", "-DHAVE_LINK_H", + "-DHAVE_SYMBOLIZE", # Supported by ] linux_only_copts = [ # For utilities.h. "-DHAVE_EXECINFO_H", "-DHAVE_LINK_H", + "-DHAVE_SYMBOLIZE", # Supported by ] darwin_only_copts = [ diff --git a/src/symbolize.h b/src/symbolize.h index d9ca52ddc..9eb5de40f 100644 --- a/src/symbolize.h +++ b/src/symbolize.h @@ -77,6 +77,10 @@ # error "symbolize.h" was not included correctly. #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 HAVE_SYMBOLIZE // defined by gcc