-
Notifications
You must be signed in to change notification settings - Fork 28
/
glog.BUILD
80 lines (78 loc) · 2.02 KB
/
glog.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cc_library(
name = "glog",
srcs = [
"config.h",
"src/base/commandlineflags.h",
"src/base/googleinit.h",
"src/base/mutex.h",
"src/demangle.cc",
"src/demangle.h",
"src/logging.cc",
"src/raw_logging.cc",
"src/signalhandler.cc",
"src/symbolize.cc",
"src/symbolize.h",
"src/utilities.cc",
"src/utilities.h",
"src/vlog_is_on.cc",
] + glob(["src/stacktrace*.h"]),
hdrs = [
"src/glog/log_severity.h",
"src/glog/logging.h",
"src/glog/raw_logging.h",
"src/glog/stl_logging.h",
"src/glog/vlog_is_on.h",
],
copts = [
"-Wno-sign-compare",
"-U_XOPEN_SOURCE",
],
includes = ["./src"],
linkopts = ["-lpthread",
"-lunwind"],
visibility = ["//visibility:public"],
deps = [
"@com_github_gflags_gflags//:gflags",
],
)
config_setting(
name = "libunwind",
values = {
"define": "libunwind=true",
},
)
genrule(
name = "run_configure",
srcs = [
"README",
"Makefile.in",
"config.guess",
"config.sub",
"install-sh",
"ltmain.sh",
"missing",
"libglog.pc.in",
"src/config.h.in",
"src/glog/logging.h.in",
"src/glog/raw_logging.h.in",
"src/glog/stl_logging.h.in",
"src/glog/vlog_is_on.h.in",
],
outs = [
"config.h",
"src/glog/logging.h",
"src/glog/raw_logging.h",
"src/glog/stl_logging.h",
"src/glog/vlog_is_on.h",
],
tools = [
"configure",
],
cmd = "$(location :configure)" +
"&& cp -v src/config.h $(location config.h) " +
"&& cp -v src/glog/logging.h $(location src/glog/logging.h) " +
"&& cp -v src/glog/raw_logging.h $(location src/glog/raw_logging.h) " +
"&& cp -v src/glog/stl_logging.h $(location src/glog/stl_logging.h) " +
"&& cp -v src/glog/vlog_is_on.h $(location src/glog/vlog_is_on.h) "
,
)