Brian Silverman | c03a30c | 2019-02-16 18:21:56 -0800 | [diff] [blame] | 1 | load("//tools:environments.bzl", "mcu_cpus") |
| 2 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 3 | cc_library( |
| 4 | name = "time", |
| 5 | srcs = [ |
| 6 | "time.cc", |
| 7 | ], |
| 8 | hdrs = [ |
| 9 | "time.h", |
| 10 | ], |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 11 | visibility = ["//visibility:public"], |
| 12 | deps = [ |
| 13 | "//aos:macros", |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 14 | "//aos/mutex", |
| 15 | "//aos/type_traits", |
Austin Schuh | f257f3c | 2019-10-27 21:00:43 -0700 | [diff] [blame] | 16 | "@com_github_google_glog//:glog", |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 17 | ], |
| 18 | ) |
| 19 | |
| 20 | # TODO(Brian): Remove this hack once bazel chases deps through selects correctly. |
| 21 | cc_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 Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 31 | deps = [ |
| 32 | "//aos:macros", |
Brian Silverman | c03a30c | 2019-02-16 18:21:56 -0800 | [diff] [blame] | 33 | "//aos/type_traits", |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 34 | "//motors/core", |
| 35 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 36 | ) |
| 37 | |
| 38 | cc_test( |
| 39 | name = "time_test", |
| 40 | srcs = [ |
| 41 | "time_test.cc", |
| 42 | ], |
| 43 | deps = [ |
| 44 | ":time", |
| 45 | "//aos/logging", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 46 | "//aos/testing:googletest", |
Brian Silverman | c03a30c | 2019-02-16 18:21:56 -0800 | [diff] [blame] | 47 | "//aos/util:death_test_log_implementation", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 48 | ], |
| 49 | ) |