Fix syscall warning in Bazel Build

This commit resolves [#717](https://github.com/google/glog/issues/717) issue.
This commit is contained in:
Artur 2021-10-07 16:24:00 +03:00 committed by Rodrigo Queiro
parent 56523194b3
commit c34dbe9873

View File

@ -26,10 +26,10 @@ expand_template = rule(
) )
def dict_union(x, y): def dict_union(x, y):
z = {} z = {}
z.update(x) z.update(x)
z.update(y) z.update(y)
return z return z
def glog_library(namespace = "google", with_gflags = 1, **kwargs): def glog_library(namespace = "google", with_gflags = 1, **kwargs):
if native.repository_name() != "@": if native.repository_name() != "@":
@ -92,6 +92,8 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
darwin_only_copts = [ darwin_only_copts = [
# For stacktrace. # For stacktrace.
"-DHAVE_DLADDR", "-DHAVE_DLADDR",
# Avoid deprecated syscall().
"-DHAVE_PTHREAD_THREADID_NP",
] ]
windows_only_copts = [ windows_only_copts = [
@ -139,13 +141,13 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
"//conditions:default": [], "//conditions:default": [],
}), }),
hdrs = [ hdrs = [
"src/glog/log_severity.h", "src/glog/log_severity.h",
"src/glog/platform.h", "src/glog/platform.h",
":logging_h", ":logging_h",
":raw_logging_h", ":raw_logging_h",
":stl_logging_h", ":stl_logging_h",
":vlog_is_on_h", ":vlog_is_on_h",
], ],
strip_include_prefix = "src", strip_include_prefix = "src",
defines = select({ defines = select({
# GOOGLE_GLOG_DLL_DECL is normally set by export.h, but that's not # GOOGLE_GLOG_DLL_DECL is normally set by export.h, but that's not