Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_rust_library") |
| 2 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 3 | load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 4 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 5 | load("//tools/build_rules:autocxx.bzl", "autocxx_library") |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 6 | |
Austin Schuh | 00e302a | 2020-12-21 11:53:30 -0800 | [diff] [blame] | 7 | exports_files(["aos_dump_autocomplete.sh"]) |
| 8 | |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 9 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 10 | name = "prime_binaries", |
| 11 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 12 | "//aos:aos_dump", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 13 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 14 | "//aos:aos_send", |
Austin Schuh | 91d8d06 | 2020-11-02 17:11:13 -0800 | [diff] [blame] | 15 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 16 | ], |
| 17 | visibility = ["//visibility:public"], |
Austin Schuh | 1eceeb9 | 2015-11-08 21:16:06 -0800 | [diff] [blame] | 18 | ) |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 19 | |
| 20 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 21 | name = "prime_start_binaries", |
| 22 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 23 | "//aos/events/logging:logger_main", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 24 | ], |
| 25 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 26 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 27 | |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 28 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 29 | name = "prime_binaries_stripped", |
| 30 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 31 | "//aos:aos_dump.stripped", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 32 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 33 | "//aos:aos_send.stripped", |
Austin Schuh | 44e0b14 | 2021-10-16 15:51:10 -0700 | [diff] [blame] | 34 | "//aos/starter:starter_stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 35 | ], |
| 36 | visibility = ["//visibility:public"], |
| 37 | ) |
| 38 | |
| 39 | filegroup( |
| 40 | name = "prime_start_binaries_stripped", |
| 41 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 42 | "//aos/events/logging:logger_main.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 43 | ], |
| 44 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 45 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 46 | |
| 47 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 48 | name = "math", |
| 49 | hdrs = [ |
| 50 | "commonmath.h", |
| 51 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 52 | visibility = ["//visibility:public"], |
| 53 | ) |
| 54 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 55 | py_library( |
| 56 | name = "python_init", |
| 57 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 58 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 59 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 60 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 61 | |
| 62 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 63 | name = "macros", |
| 64 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 65 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 66 | ], |
| 67 | visibility = ["//visibility:public"], |
| 68 | ) |
| 69 | |
| 70 | cc_library( |
| 71 | name = "gtest_prod", |
| 72 | hdrs = [ |
| 73 | "gtest_prod.h", |
| 74 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 75 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 76 | visibility = ["//visibility:public"], |
| 77 | ) |
| 78 | |
| 79 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 80 | name = "unique_malloc_ptr", |
| 81 | hdrs = [ |
| 82 | "unique_malloc_ptr.h", |
| 83 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 84 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 85 | visibility = ["//visibility:public"], |
| 86 | ) |
| 87 | |
| 88 | cc_library( |
| 89 | name = "condition", |
| 90 | srcs = [ |
| 91 | "condition.cc", |
| 92 | ], |
| 93 | hdrs = [ |
| 94 | "condition.h", |
| 95 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 96 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 97 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 98 | deps = [ |
| 99 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 100 | "//aos/mutex", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 101 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 102 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 103 | ) |
| 104 | |
| 105 | cc_test( |
| 106 | name = "condition_test", |
| 107 | srcs = [ |
| 108 | "condition_test.cc", |
| 109 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 110 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 111 | deps = [ |
| 112 | ":condition", |
| 113 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 114 | "//aos/ipc_lib:aos_sync", |
| 115 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 116 | "//aos/logging", |
| 117 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 118 | "//aos/testing:googletest", |
| 119 | "//aos/testing:prevent_exit", |
| 120 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 121 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 122 | ], |
| 123 | ) |
| 124 | |
| 125 | cc_library( |
| 126 | name = "die", |
| 127 | srcs = [ |
| 128 | "die.cc", |
| 129 | ], |
| 130 | hdrs = [ |
| 131 | "die.h", |
| 132 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 133 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 134 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 135 | deps = [ |
| 136 | "//aos:macros", |
| 137 | "//aos/libc:aos_strerror", |
| 138 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 139 | ) |
| 140 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 141 | cc_test( |
| 142 | name = "die_test", |
| 143 | srcs = [ |
| 144 | "die_test.cc", |
| 145 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 146 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 147 | deps = [ |
| 148 | ":die", |
| 149 | "//aos/testing:googletest", |
| 150 | ], |
| 151 | ) |
| 152 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 153 | cc_binary( |
| 154 | name = "dump_rtprio", |
| 155 | srcs = [ |
| 156 | "dump_rtprio.cc", |
| 157 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 158 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 159 | deps = [ |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 160 | "//aos/time", |
Brian Silverman | 3eb60d2 | 2021-11-04 19:06:47 -0700 | [diff] [blame] | 161 | "@com_github_google_glog//:glog", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 162 | ], |
| 163 | ) |
| 164 | |
| 165 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 166 | name = "init", |
| 167 | srcs = [ |
| 168 | "init.cc", |
| 169 | ], |
| 170 | hdrs = [ |
| 171 | "init.h", |
| 172 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 173 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 174 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 175 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 176 | ":realtime", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 177 | "//aos:die", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 178 | "//aos/logging:implementations", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 179 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 180 | ) |
| 181 | |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 182 | autocxx_library( |
| 183 | name = "init_rs", |
| 184 | srcs = ["init.rs"], |
| 185 | crate_name = "aos_init", |
| 186 | libs = [ |
| 187 | ":init", |
| 188 | ], |
| 189 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 190 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 191 | visibility = ["//visibility:public"], |
| 192 | ) |
| 193 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 194 | cc_library( |
| 195 | name = "realtime", |
| 196 | srcs = [ |
| 197 | "realtime.cc", |
| 198 | ], |
| 199 | hdrs = [ |
| 200 | "realtime.h", |
| 201 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 202 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 203 | visibility = ["//visibility:public"], |
| 204 | deps = [ |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 205 | ":thread_local", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 206 | "@com_github_google_glog//:glog", |
| 207 | ], |
| 208 | ) |
| 209 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 210 | flatbuffer_cc_library( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 211 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 212 | srcs = ["configuration.fbs"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 213 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 214 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 215 | visibility = ["//visibility:public"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 216 | ) |
| 217 | |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 218 | cc_static_flatbuffer( |
| 219 | name = "configuration_schema", |
| 220 | function = "aos::ConfigurationSchema", |
| 221 | target = ":configuration_fbs_reflection_out", |
| 222 | visibility = ["//visibility:public"], |
| 223 | ) |
| 224 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 225 | flatbuffer_ts_library( |
| 226 | name = "configuration_ts_fbs", |
| 227 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 228 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 229 | visibility = ["//visibility:public"], |
| 230 | ) |
| 231 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 232 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 233 | name = "configuration_fbs_python", |
| 234 | srcs = ["configuration.fbs"], |
| 235 | namespace = "aos", |
| 236 | tables = [ |
| 237 | "Configuration", |
| 238 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 239 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 240 | "Map", |
| 241 | "Node", |
| 242 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 243 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 244 | visibility = ["//visibility:public"], |
| 245 | ) |
| 246 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 247 | flatbuffer_rust_library( |
| 248 | name = "configuration_rust_fbs", |
| 249 | srcs = ["configuration.fbs"], |
| 250 | crate_name = "aos_configuration_fbs", |
| 251 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 252 | visibility = ["//visibility:public"], |
| 253 | ) |
| 254 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 255 | cc_library( |
| 256 | name = "configuration", |
| 257 | srcs = [ |
| 258 | "configuration.cc", |
| 259 | ], |
| 260 | hdrs = [ |
| 261 | "configuration.h", |
| 262 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 263 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 264 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 265 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 266 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 267 | ":flatbuffer_merge", |
| 268 | ":flatbuffers", |
| 269 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 270 | "//aos:unique_malloc_ptr", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 271 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 272 | "//aos/util:file", |
| 273 | "@com_github_google_glog//:glog", |
| 274 | "@com_google_absl//absl/container:btree", |
| 275 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 276 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 277 | ) |
| 278 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 279 | cc_library( |
| 280 | name = "configuration_for_rust", |
| 281 | srcs = [ |
| 282 | "configuration_for_rust.cc", |
| 283 | ], |
| 284 | hdrs = [ |
| 285 | "configuration_for_rust.h", |
| 286 | ], |
| 287 | deps = [ |
| 288 | ":configuration", |
| 289 | ":for_rust", |
| 290 | "//third_party/cargo:cxx_cc", |
| 291 | ], |
| 292 | ) |
| 293 | |
| 294 | autocxx_library( |
| 295 | name = "configuration_rs", |
| 296 | srcs = ["configuration.rs"], |
| 297 | crate_name = "aos_configuration", |
| 298 | libs = [ |
| 299 | ":configuration", |
| 300 | ":configuration_for_rust", |
| 301 | ":configuration_fbs", |
| 302 | ], |
| 303 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 304 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 305 | visibility = ["//visibility:public"], |
| 306 | deps = [ |
| 307 | ":configuration_rust_fbs", |
| 308 | ":flatbuffers_rs", |
| 309 | "//third_party/cargo:thiserror", |
| 310 | ], |
| 311 | ) |
| 312 | |
| 313 | rust_test( |
| 314 | name = "configuration_rs_test", |
| 315 | crate = ":configuration_rs", |
| 316 | data = [ |
| 317 | "//aos/testdata:test_configs", |
| 318 | ], |
| 319 | # TODO: Make Rust play happy with pic vs nopic. Details at: |
| 320 | # https://github.com/bazelbuild/rules_rust/issues/118 |
| 321 | rustc_flags = ["-Crelocation-model=static"], |
| 322 | ) |
| 323 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 324 | flatbuffer_ts_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 325 | name = "json_to_flatbuffer_fbs_ts", |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 326 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 327 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 328 | visibility = ["//aos:__subpackages__"], |
| 329 | ) |
| 330 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 331 | flatbuffer_cc_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 332 | name = "json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 333 | srcs = ["json_to_flatbuffer.fbs"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 334 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 335 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 336 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 337 | ) |
| 338 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 339 | flatbuffer_rust_library( |
| 340 | name = "json_to_flatbuffer_rust_fbs", |
| 341 | srcs = ["json_to_flatbuffer.fbs"], |
| 342 | crate_name = "aos_json_to_flatbuffer_fbs", |
| 343 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 344 | visibility = ["//aos:__subpackages__"], |
| 345 | ) |
| 346 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 347 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 348 | name = "flatbuffer_utils", |
| 349 | srcs = ["flatbuffer_utils.cc"], |
| 350 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 351 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 352 | visibility = ["//visibility:public"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 353 | deps = [ |
| 354 | "@com_github_google_flatbuffers//:flatbuffers", |
Brian Silverman | cf4fb66 | 2021-02-10 17:54:53 -0800 | [diff] [blame] | 355 | "@com_github_google_glog//:glog", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 356 | ], |
| 357 | ) |
| 358 | |
| 359 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 360 | name = "json_tokenizer", |
| 361 | srcs = ["json_tokenizer.cc"], |
| 362 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 363 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 364 | deps = [ |
Pallavi Madhukar | e2eb281 | 2022-07-19 09:56:09 -0700 | [diff] [blame] | 365 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 366 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 367 | "@com_google_absl//absl/strings", |
| 368 | ], |
| 369 | ) |
| 370 | |
| 371 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 372 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 373 | srcs = [ |
| 374 | "flatbuffer_introspection.cc", |
| 375 | "json_to_flatbuffer.cc", |
| 376 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 377 | hdrs = ["json_to_flatbuffer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 378 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 379 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 380 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 381 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 382 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 383 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 384 | ":json_tokenizer", |
Austin Schuh | bba1028 | 2021-03-20 22:03:28 -0700 | [diff] [blame] | 385 | "//aos/util:file", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 386 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 387 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 388 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 389 | ], |
| 390 | ) |
| 391 | |
| 392 | cc_test( |
| 393 | name = "json_to_flatbuffer_test", |
| 394 | srcs = [ |
| 395 | "json_to_flatbuffer_test.cc", |
| 396 | ], |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 397 | data = [ |
| 398 | ":json_to_flatbuffer_fbs_reflection_out", |
| 399 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 400 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 401 | deps = [ |
| 402 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 403 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 404 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 405 | "//aos/testing:path", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 406 | ], |
| 407 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 408 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 409 | cc_test( |
| 410 | name = "flatbuffer_introspection_test", |
| 411 | srcs = [ |
| 412 | "flatbuffer_introspection_test.cc", |
| 413 | ], |
| 414 | data = [ |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 415 | ":json_to_flatbuffer_fbs_reflection_out", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 416 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 417 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 418 | deps = [ |
| 419 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 420 | ":json_to_flatbuffer_fbs", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 421 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 422 | "//aos/testing:path", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 423 | "//aos/util:file", |
| 424 | "@com_github_google_flatbuffers//:flatbuffers", |
| 425 | ], |
| 426 | ) |
| 427 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 428 | cc_library( |
| 429 | name = "flatbuffer_merge", |
| 430 | srcs = ["flatbuffer_merge.cc"], |
| 431 | hdrs = ["flatbuffer_merge.h"], |
| 432 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 433 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 434 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 435 | deps = [ |
| 436 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 437 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 438 | "@com_github_google_flatbuffers//:flatbuffers", |
| 439 | ], |
| 440 | ) |
| 441 | |
| 442 | cc_test( |
| 443 | name = "flatbuffer_merge_test", |
| 444 | srcs = [ |
| 445 | "flatbuffer_merge_test.cc", |
| 446 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 447 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 448 | deps = [ |
| 449 | ":flatbuffer_merge", |
| 450 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 451 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 452 | "//aos/testing:googletest", |
| 453 | ], |
| 454 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 455 | |
| 456 | cc_library( |
| 457 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 458 | srcs = [ |
| 459 | "flatbuffers.cc", |
| 460 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 461 | hdrs = [ |
| 462 | "flatbuffers.h", |
| 463 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 464 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 465 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 466 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 467 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 468 | "//aos/containers:resizeable_buffer", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 469 | "//aos/util:file", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 470 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 471 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 472 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 473 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 474 | ], |
| 475 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 476 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 477 | rust_library( |
| 478 | name = "flatbuffers_rs", |
| 479 | srcs = ["flatbuffers.rs"], |
| 480 | crate_name = "aos_flatbuffers", |
| 481 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 482 | visibility = ["//visibility:public"], |
| 483 | deps = [ |
| 484 | "@com_github_google_flatbuffers//rust", |
| 485 | ], |
| 486 | ) |
| 487 | |
| 488 | rust_test( |
| 489 | name = "flatbuffers_rs_test", |
| 490 | crate = ":flatbuffers_rs", |
| 491 | deps = [ |
| 492 | ":json_to_flatbuffer_rust_fbs", |
| 493 | ], |
| 494 | ) |
| 495 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 496 | cc_test( |
| 497 | name = "configuration_test", |
| 498 | srcs = [ |
| 499 | "configuration_test.cc", |
| 500 | ], |
| 501 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 502 | "//aos/events:pingpong_config", |
Brian Silverman | dae15a1 | 2022-07-23 12:55:20 -0700 | [diff] [blame] | 503 | "//aos/events:pong_fbs_reflection_out", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 504 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 505 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 506 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 507 | deps = [ |
| 508 | ":configuration", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 509 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 510 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 511 | "//aos/testing:path", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 512 | "//aos/testing:test_logging", |
| 513 | ], |
| 514 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 515 | |
| 516 | cc_binary( |
| 517 | name = "config_flattener", |
| 518 | srcs = [ |
| 519 | "config_flattener.cc", |
| 520 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 521 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 522 | visibility = ["//visibility:public"], |
| 523 | deps = [ |
| 524 | ":configuration", |
| 525 | ":init", |
| 526 | "//aos/util:file", |
| 527 | "@com_github_google_glog//:glog", |
| 528 | ], |
| 529 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 530 | |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 531 | cc_library( |
| 532 | name = "aos_cli_utils", |
| 533 | srcs = [ |
| 534 | "aos_cli_utils.cc", |
| 535 | ], |
| 536 | hdrs = [ |
| 537 | "aos_cli_utils.h", |
| 538 | ], |
| 539 | target_compatible_with = ["@platforms//os:linux"], |
| 540 | visibility = ["//visibility:public"], |
| 541 | deps = [ |
| 542 | ":configuration", |
| 543 | "//aos:init", |
| 544 | "//aos/events:shm_event_loop", |
Austin Schuh | 893d7f4 | 2022-09-16 15:01:35 -0700 | [diff] [blame] | 545 | "//aos/events:simulated_event_loop", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 546 | "@com_github_google_glog//:glog", |
| 547 | ], |
| 548 | ) |
| 549 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 550 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 551 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 552 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 553 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 554 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 555 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 556 | visibility = ["//visibility:public"], |
| 557 | deps = [ |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 558 | ":aos_cli_utils", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 559 | ":configuration", |
| 560 | ":json_to_flatbuffer", |
| 561 | "//aos:init", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 562 | "@com_github_google_glog//:glog", |
| 563 | ], |
| 564 | ) |
| 565 | |
| 566 | cc_binary( |
| 567 | name = "aos_send", |
| 568 | srcs = [ |
| 569 | "aos_send.cc", |
| 570 | ], |
| 571 | target_compatible_with = ["@platforms//os:linux"], |
| 572 | visibility = ["//visibility:public"], |
| 573 | deps = [ |
| 574 | ":aos_cli_utils", |
| 575 | ":configuration", |
| 576 | ":init", |
| 577 | ":json_to_flatbuffer", |
| 578 | "@com_github_gflags_gflags//:gflags", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 579 | "@com_github_google_glog//:glog", |
| 580 | ], |
| 581 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 582 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 583 | cc_binary( |
| 584 | name = "aos_graph_nodes", |
| 585 | srcs = [ |
| 586 | "aos_graph_nodes.cc", |
| 587 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 588 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 589 | visibility = ["//visibility:public"], |
| 590 | deps = [ |
| 591 | ":configuration", |
| 592 | ":json_to_flatbuffer", |
| 593 | "//aos:init", |
| 594 | "//aos/events:shm_event_loop", |
| 595 | "@com_github_google_glog//:glog", |
| 596 | ], |
| 597 | ) |
| 598 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 599 | cc_library( |
| 600 | name = "ftrace", |
| 601 | srcs = [ |
| 602 | "ftrace.cc", |
| 603 | ], |
| 604 | hdrs = [ |
| 605 | "ftrace.h", |
| 606 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 607 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 608 | visibility = ["//visibility:public"], |
| 609 | deps = [ |
| 610 | "@com_github_google_glog//:glog", |
| 611 | ], |
| 612 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 613 | |
| 614 | cc_library( |
| 615 | name = "fast_string_builder", |
| 616 | srcs = [ |
| 617 | "fast_string_builder.cc", |
| 618 | ], |
| 619 | hdrs = [ |
| 620 | "fast_string_builder.h", |
| 621 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 622 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 623 | visibility = ["//visibility:public"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 624 | deps = [ |
| 625 | "@com_github_google_glog//:glog", |
| 626 | "@com_google_absl//absl/strings", |
| 627 | "@com_google_absl//absl/strings:str_format", |
| 628 | ], |
| 629 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 630 | |
| 631 | cc_library( |
| 632 | name = "thread_local", |
| 633 | hdrs = [ |
| 634 | "thread_local.h", |
| 635 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 636 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 637 | visibility = ["//visibility:public"], |
| 638 | ) |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 639 | |
| 640 | cc_test( |
| 641 | name = "realtime_test", |
| 642 | srcs = [ |
| 643 | "realtime_test.cc", |
| 644 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 645 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 646 | visibility = ["//visibility:public"], |
| 647 | deps = [ |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 648 | ":init", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 649 | ":realtime", |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 650 | "@com_github_gflags_gflags//:gflags", |
| 651 | "@com_github_google_glog//:glog", |
| 652 | "@com_google_googletest//:gtest", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 653 | ], |
| 654 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 655 | |
| 656 | cc_test( |
| 657 | name = "flatbuffers_test", |
| 658 | srcs = [ |
| 659 | "flatbuffers_test.cc", |
| 660 | ], |
| 661 | deps = [ |
| 662 | ":flatbuffers", |
| 663 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 664 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 665 | "//aos/testing:googletest", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 666 | "//aos/testing:tmpdir", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 667 | ], |
| 668 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 669 | |
| 670 | py_binary( |
| 671 | name = "flatbuffers_static", |
| 672 | srcs = ["flatbuffers_static.py"], |
| 673 | visibility = ["//visibility:public"], |
| 674 | ) |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 675 | |
| 676 | cc_library( |
| 677 | name = "uuid", |
| 678 | srcs = ["uuid.cc"], |
| 679 | hdrs = ["uuid.h"], |
| 680 | target_compatible_with = ["@platforms//os:linux"], |
| 681 | visibility = ["//visibility:public"], |
| 682 | deps = [ |
Austin Schuh | 81d0fe4 | 2022-08-17 16:29:23 -0700 | [diff] [blame] | 683 | ":thread_local", |
Austin Schuh | 8902fa5 | 2021-03-14 22:39:24 -0700 | [diff] [blame] | 684 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 685 | "@com_github_google_flatbuffers//:flatbuffers", |
| 686 | "@com_github_google_glog//:glog", |
| 687 | "@com_google_absl//absl/types:span", |
| 688 | ], |
| 689 | ) |
| 690 | |
| 691 | cc_test( |
| 692 | name = "uuid_test", |
| 693 | srcs = ["uuid_test.cc"], |
| 694 | target_compatible_with = ["@platforms//os:linux"], |
| 695 | deps = [ |
| 696 | ":uuid", |
| 697 | "//aos/testing:googletest", |
| 698 | ], |
| 699 | ) |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 700 | |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 701 | cc_library( |
| 702 | name = "uuid_for_rust", |
| 703 | hdrs = ["uuid_for_rust.h"], |
| 704 | deps = [ |
| 705 | ":uuid", |
| 706 | ], |
| 707 | ) |
| 708 | |
| 709 | autocxx_library( |
| 710 | name = "uuid_rs", |
| 711 | srcs = ["uuid.rs"], |
| 712 | crate_name = "aos_uuid", |
| 713 | libs = [ |
| 714 | ":uuid", |
| 715 | ":uuid_for_rust", |
| 716 | ], |
| 717 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 718 | rs_deps = [ |
| 719 | "//third_party/cargo:uuid", |
| 720 | ], |
| 721 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 722 | visibility = ["//visibility:public"], |
| 723 | ) |
| 724 | |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 725 | cc_binary( |
| 726 | name = "aos_graph_channels", |
| 727 | srcs = [ |
| 728 | "aos_graph_channels.cc", |
| 729 | ], |
| 730 | target_compatible_with = ["@platforms//os:linux"], |
| 731 | deps = [ |
| 732 | "//aos:configuration", |
| 733 | "//aos:init", |
| 734 | "//aos:json_to_flatbuffer", |
| 735 | "//aos/events:simulated_event_loop", |
| 736 | "//aos/events/logging:log_reader", |
| 737 | "//aos/time", |
| 738 | "@com_github_gflags_gflags//:gflags", |
| 739 | "@com_github_google_glog//:glog", |
| 740 | ], |
| 741 | ) |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 742 | |
| 743 | cc_library( |
| 744 | name = "for_rust", |
| 745 | hdrs = [ |
| 746 | "for_rust.h", |
| 747 | ], |
| 748 | visibility = ["//visibility:public"], |
| 749 | deps = [ |
| 750 | "//third_party/cargo:cxx_cc", |
| 751 | ], |
| 752 | ) |