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 = [ |
Austin Schuh | f257f3c | 2019-10-27 21:00:43 -0700 | [diff] [blame] | 13 | "@com_github_google_glog//:glog", |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 14 | ], |
| 15 | ) |
| 16 | |
| 17 | # TODO(Brian): Remove this hack once bazel chases deps through selects correctly. |
| 18 | cc_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 Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 28 | deps = [ |
Brian Silverman | 3240e10 | 2019-02-16 18:24:24 -0800 | [diff] [blame] | 29 | "//motors/core", |
| 30 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 31 | ) |
| 32 | |
| 33 | cc_test( |
| 34 | name = "time_test", |
| 35 | srcs = [ |
| 36 | "time_test.cc", |
| 37 | ], |
| 38 | deps = [ |
| 39 | ":time", |
| 40 | "//aos/logging", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 41 | "//aos/testing:googletest", |
Brian Silverman | c03a30c | 2019-02-16 18:21:56 -0800 | [diff] [blame] | 42 | "//aos/util:death_test_log_implementation", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 43 | ], |
| 44 | ) |