blob: 619642ea4a7ce3f3f6f7a49fd848557e6665ac90 [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",
Brian Silverman3240e102019-02-16 18:24:24 -080014 "//aos/mutex",
15 "//aos/type_traits",
Austin Schuhf257f3c2019-10-27 21:00:43 -070016 "@com_github_google_glog//:glog",
Brian Silverman3240e102019-02-16 18:24:24 -080017 ],
18)
19
20# TODO(Brian): Remove this hack once bazel chases deps through selects correctly.
21cc_library(
22 name = "time_mcu",
23 srcs = [
24 "time.cc",
25 ],
26 hdrs = [
27 "time.h",
28 ],
29 restricted_to = mcu_cpus,
30 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -070031 deps = [
32 "//aos:macros",
Brian Silvermanc03a30c2019-02-16 18:21:56 -080033 "//aos/type_traits",
Brian Silverman3240e102019-02-16 18:24:24 -080034 "//motors/core",
35 ],
John Park33858a32018-09-28 23:05:48 -070036)
37
38cc_test(
39 name = "time_test",
40 srcs = [
41 "time_test.cc",
42 ],
43 deps = [
44 ":time",
45 "//aos/logging",
John Park33858a32018-09-28 23:05:48 -070046 "//aos/testing:googletest",
Brian Silvermanc03a30c2019-02-16 18:21:56 -080047 "//aos/util:death_test_log_implementation",
John Park33858a32018-09-28 23:05:48 -070048 ],
49)