blob: c9f8d6d70ab72cae448707eb48ecabb0faeb8864 [file] [log] [blame]
Brian Silvermanc03a30c2019-02-16 18:21:56 -08001load("//tools:environments.bzl", "mcu_cpus")
2
John Park33858a32018-09-28 23:05:48 -07003cc_library(
4 name = "time",
5 srcs = [
6 "time.cc",
7 ],
8 hdrs = [
9 "time.h",
10 ],
Brian Silverman3240e102019-02-16 18:24:24 -080011 visibility = ["//visibility:public"],
12 deps = [
Austin Schuhf257f3c2019-10-27 21:00:43 -070013 "@com_github_google_glog//:glog",
Brian Silverman3240e102019-02-16 18:24:24 -080014 ],
15)
16
17# TODO(Brian): Remove this hack once bazel chases deps through selects correctly.
18cc_library(
19 name = "time_mcu",
20 srcs = [
21 "time.cc",
22 ],
23 hdrs = [
24 "time.h",
25 ],
26 restricted_to = mcu_cpus,
27 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -070028 deps = [
Brian Silverman3240e102019-02-16 18:24:24 -080029 "//motors/core",
30 ],
John Park33858a32018-09-28 23:05:48 -070031)
32
33cc_test(
34 name = "time_test",
35 srcs = [
36 "time_test.cc",
37 ],
38 deps = [
39 ":time",
40 "//aos/logging",
John Park33858a32018-09-28 23:05:48 -070041 "//aos/testing:googletest",
Brian Silvermanc03a30c2019-02-16 18:21:56 -080042 "//aos/util:death_test_log_implementation",
John Park33858a32018-09-28 23:05:48 -070043 ],
44)