blob: 6570490592e433e08a8a39e19ebd63d7dcb41244 [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 = [
13 "//aos:macros",
14 "//aos/ipc_lib:shared_mem",
15 "//aos/logging",
16 "//aos/mutex",
17 "//aos/type_traits",
18 ],
19)
20
21# TODO(Brian): Remove this hack once bazel chases deps through selects correctly.
22cc_library(
23 name = "time_mcu",
24 srcs = [
25 "time.cc",
26 ],
27 hdrs = [
28 "time.h",
29 ],
30 restricted_to = mcu_cpus,
31 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -070032 deps = [
33 "//aos:macros",
Brian Silvermanc03a30c2019-02-16 18:21:56 -080034 "//aos/type_traits",
Brian Silverman3240e102019-02-16 18:24:24 -080035 "//motors/core",
36 ],
John Park33858a32018-09-28 23:05:48 -070037)
38
39cc_test(
40 name = "time_test",
41 srcs = [
42 "time_test.cc",
43 ],
44 deps = [
45 ":time",
46 "//aos/logging",
John Park33858a32018-09-28 23:05:48 -070047 "//aos/testing:googletest",
Brian Silvermanc03a30c2019-02-16 18:21:56 -080048 "//aos/util:death_test_log_implementation",
John Park33858a32018-09-28 23:05:48 -070049 ],
50)