John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 1 | load("//tools:environments.bzl", "mcu_cpus") |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 2 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_ts_library") |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 3 | |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 4 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 5 | name = "prime_binaries", |
| 6 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 7 | "//aos:aos_dump", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 8 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 9 | ], |
| 10 | visibility = ["//visibility:public"], |
Austin Schuh | 1eceeb9 | 2015-11-08 21:16:06 -0800 | [diff] [blame] | 11 | ) |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 12 | |
| 13 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 14 | name = "prime_start_binaries", |
| 15 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 16 | "//aos/events/logging:logger_main", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 17 | ], |
| 18 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 19 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 20 | |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 21 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 22 | name = "prime_binaries_stripped", |
| 23 | srcs = [ |
| 24 | # starter is hard coded to look for a non-stripped core... |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 25 | "//aos:aos_dump.stripped", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 26 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 27 | ], |
| 28 | visibility = ["//visibility:public"], |
| 29 | ) |
| 30 | |
| 31 | filegroup( |
| 32 | name = "prime_start_binaries_stripped", |
| 33 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 34 | "//aos/events/logging:logger_main.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 35 | ], |
| 36 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 37 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 38 | |
| 39 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 40 | name = "math", |
| 41 | hdrs = [ |
| 42 | "commonmath.h", |
| 43 | ], |
| 44 | compatible_with = mcu_cpus, |
| 45 | visibility = ["//visibility:public"], |
| 46 | ) |
| 47 | |
| 48 | cc_library( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 49 | name = "once", |
| 50 | srcs = [ |
| 51 | "once-tmpl.h", |
| 52 | ], |
| 53 | hdrs = [ |
| 54 | "once.h", |
| 55 | ], |
| 56 | visibility = ["//visibility:public"], |
| 57 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 58 | "//aos:gtest_prod", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 59 | "//aos/type_traits", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 60 | ], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 61 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 62 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 63 | cc_library( |
| 64 | name = "byteorder", |
| 65 | hdrs = [ |
| 66 | "byteorder.h", |
| 67 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 68 | visibility = ["//visibility:public"], |
| 69 | ) |
| 70 | |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 71 | cc_test( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 72 | name = "once_test", |
| 73 | srcs = [ |
| 74 | "once_test.cc", |
| 75 | ], |
| 76 | visibility = ["//visibility:public"], |
| 77 | deps = [ |
| 78 | "//aos:once", |
| 79 | "//aos/testing:googletest", |
| 80 | ], |
| 81 | ) |
| 82 | |
| 83 | py_library( |
| 84 | name = "python_init", |
| 85 | srcs = ["__init__.py"], |
| 86 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 87 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 88 | |
| 89 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 90 | name = "macros", |
| 91 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 92 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 93 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 94 | compatible_with = mcu_cpus, |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 95 | visibility = ["//visibility:public"], |
| 96 | ) |
| 97 | |
| 98 | cc_library( |
| 99 | name = "gtest_prod", |
| 100 | hdrs = [ |
| 101 | "gtest_prod.h", |
| 102 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 103 | visibility = ["//visibility:public"], |
| 104 | ) |
| 105 | |
| 106 | cc_library( |
| 107 | name = "network_port", |
| 108 | hdrs = [ |
| 109 | "network_port.h", |
| 110 | ], |
| 111 | visibility = ["//visibility:public"], |
| 112 | ) |
| 113 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 114 | cc_library( |
| 115 | name = "unique_malloc_ptr", |
| 116 | hdrs = [ |
| 117 | "unique_malloc_ptr.h", |
| 118 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 119 | visibility = ["//visibility:public"], |
| 120 | ) |
| 121 | |
| 122 | cc_library( |
| 123 | name = "condition", |
| 124 | srcs = [ |
| 125 | "condition.cc", |
| 126 | ], |
| 127 | hdrs = [ |
| 128 | "condition.h", |
| 129 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 130 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 131 | deps = [ |
| 132 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 133 | "//aos/mutex", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 134 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 135 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 136 | ) |
| 137 | |
| 138 | cc_test( |
| 139 | name = "condition_test", |
| 140 | srcs = [ |
| 141 | "condition_test.cc", |
| 142 | ], |
| 143 | deps = [ |
| 144 | ":condition", |
| 145 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 146 | "//aos/ipc_lib:aos_sync", |
| 147 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 148 | "//aos/logging", |
| 149 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 150 | "//aos/testing:googletest", |
| 151 | "//aos/testing:prevent_exit", |
| 152 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 153 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 154 | ], |
| 155 | ) |
| 156 | |
| 157 | cc_library( |
| 158 | name = "die", |
| 159 | srcs = [ |
| 160 | "die.cc", |
| 161 | ], |
| 162 | hdrs = [ |
| 163 | "die.h", |
| 164 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 165 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 166 | deps = [ |
| 167 | "//aos:macros", |
| 168 | "//aos/libc:aos_strerror", |
| 169 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 170 | ) |
| 171 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 172 | cc_test( |
| 173 | name = "die_test", |
| 174 | srcs = [ |
| 175 | "die_test.cc", |
| 176 | ], |
| 177 | deps = [ |
| 178 | ":die", |
| 179 | "//aos/testing:googletest", |
| 180 | ], |
| 181 | ) |
| 182 | |
| 183 | cc_library( |
| 184 | name = "event", |
| 185 | srcs = [ |
| 186 | "event.cc", |
| 187 | ], |
| 188 | hdrs = [ |
| 189 | "event.h", |
| 190 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 191 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 192 | deps = [ |
| 193 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 194 | "//aos/time", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 195 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 196 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 197 | ) |
| 198 | |
| 199 | cc_test( |
| 200 | name = "event_test", |
| 201 | srcs = [ |
| 202 | "event_test.cc", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 203 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 204 | deps = [ |
| 205 | ":event", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 206 | "//aos/testing:googletest", |
| 207 | "//aos/testing:test_logging", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 208 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 209 | ], |
| 210 | ) |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 211 | |
| 212 | cc_binary( |
| 213 | name = "dump_rtprio", |
| 214 | srcs = [ |
| 215 | "dump_rtprio.cc", |
| 216 | ], |
| 217 | deps = [ |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 218 | "//aos/logging", |
| 219 | "//aos/logging:implementations", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 220 | "//aos/time", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 221 | ], |
| 222 | ) |
| 223 | |
| 224 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 225 | name = "complex_thread_local", |
| 226 | srcs = [ |
| 227 | "complex_thread_local.cc", |
| 228 | ], |
| 229 | hdrs = [ |
| 230 | "complex_thread_local.h", |
| 231 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 232 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 233 | deps = [ |
| 234 | "//aos:die", |
| 235 | "//aos:once", |
| 236 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 237 | ) |
| 238 | |
| 239 | cc_test( |
| 240 | name = "complex_thread_local_test", |
| 241 | srcs = [ |
| 242 | "complex_thread_local_test.cc", |
| 243 | ], |
| 244 | deps = [ |
| 245 | ":complex_thread_local", |
| 246 | "//aos/logging", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 247 | "//aos/testing:googletest", |
| 248 | ], |
| 249 | ) |
| 250 | |
| 251 | cc_library( |
| 252 | name = "init", |
| 253 | srcs = [ |
| 254 | "init.cc", |
| 255 | ], |
| 256 | hdrs = [ |
| 257 | "init.h", |
| 258 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 259 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 260 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 261 | ":realtime", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 262 | "//aos:die", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 263 | "//aos/logging:implementations", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 264 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 265 | ) |
| 266 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 267 | cc_library( |
| 268 | name = "realtime", |
| 269 | srcs = [ |
| 270 | "realtime.cc", |
| 271 | ], |
| 272 | hdrs = [ |
| 273 | "realtime.h", |
| 274 | ], |
| 275 | visibility = ["//visibility:public"], |
| 276 | deps = [ |
| 277 | "@com_github_google_glog//:glog", |
| 278 | ], |
| 279 | ) |
| 280 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 281 | flatbuffer_cc_library( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 282 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 283 | srcs = ["configuration.fbs"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 284 | gen_reflections = 1, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 285 | visibility = ["//visibility:public"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 286 | ) |
| 287 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 288 | flatbuffer_ts_library( |
| 289 | name = "configuration_ts_fbs", |
| 290 | srcs = ["configuration.fbs"], |
| 291 | visibility = ["//visibility:public"], |
| 292 | ) |
| 293 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 294 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 295 | name = "configuration_fbs_python", |
| 296 | srcs = ["configuration.fbs"], |
| 297 | namespace = "aos", |
| 298 | tables = [ |
| 299 | "Configuration", |
| 300 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 301 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 302 | "Map", |
| 303 | "Node", |
| 304 | ], |
| 305 | visibility = ["//visibility:public"], |
| 306 | ) |
| 307 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 308 | cc_library( |
| 309 | name = "configuration", |
| 310 | srcs = [ |
| 311 | "configuration.cc", |
| 312 | ], |
| 313 | hdrs = [ |
| 314 | "configuration.h", |
| 315 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 316 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 317 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 318 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 319 | ":flatbuffer_merge", |
| 320 | ":flatbuffers", |
| 321 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 322 | "//aos:unique_malloc_ptr", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 323 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 324 | "//aos/util:file", |
| 325 | "@com_github_google_glog//:glog", |
| 326 | "@com_google_absl//absl/container:btree", |
| 327 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 328 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 329 | ) |
| 330 | |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 331 | cc_library( |
| 332 | name = "make_unique", |
| 333 | hdrs = [ |
| 334 | "make_unique.h", |
| 335 | ], |
| 336 | visibility = ["//visibility:public"], |
| 337 | ) |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 338 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 339 | flatbuffer_ts_library( |
| 340 | name = "json_to_flatbuffer_flatbuffer_ts", |
| 341 | srcs = ["json_to_flatbuffer.fbs"], |
| 342 | visibility = ["//aos:__subpackages__"], |
| 343 | ) |
| 344 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 345 | flatbuffer_cc_library( |
| 346 | name = "json_to_flatbuffer_flatbuffer", |
| 347 | srcs = ["json_to_flatbuffer.fbs"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 348 | gen_reflections = 1, |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 349 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 350 | ) |
| 351 | |
| 352 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 353 | name = "flatbuffer_utils", |
| 354 | srcs = ["flatbuffer_utils.cc"], |
| 355 | hdrs = ["flatbuffer_utils.h"], |
| 356 | deps = [ |
| 357 | "@com_github_google_flatbuffers//:flatbuffers", |
| 358 | ], |
| 359 | ) |
| 360 | |
| 361 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 362 | name = "json_tokenizer", |
| 363 | srcs = ["json_tokenizer.cc"], |
| 364 | hdrs = ["json_tokenizer.h"], |
| 365 | deps = [ |
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"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 378 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 379 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 380 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 381 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 382 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 383 | ":json_tokenizer", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 384 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 385 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 386 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 387 | ], |
| 388 | ) |
| 389 | |
| 390 | cc_test( |
| 391 | name = "json_to_flatbuffer_test", |
| 392 | srcs = [ |
| 393 | "json_to_flatbuffer_test.cc", |
| 394 | ], |
| 395 | deps = [ |
| 396 | ":json_to_flatbuffer", |
| 397 | ":json_to_flatbuffer_flatbuffer", |
| 398 | "//aos/testing:googletest", |
| 399 | ], |
| 400 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 401 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 402 | cc_test( |
| 403 | name = "flatbuffer_introspection_test", |
| 404 | srcs = [ |
| 405 | "flatbuffer_introspection_test.cc", |
| 406 | ], |
| 407 | data = [ |
| 408 | ":json_to_flatbuffer_flatbuffer_reflection_out", |
| 409 | ], |
| 410 | deps = [ |
| 411 | ":json_to_flatbuffer", |
| 412 | ":json_to_flatbuffer_flatbuffer", |
| 413 | "//aos/testing:googletest", |
| 414 | "//aos/util:file", |
| 415 | "@com_github_google_flatbuffers//:flatbuffers", |
| 416 | ], |
| 417 | ) |
| 418 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 419 | cc_library( |
| 420 | name = "flatbuffer_merge", |
| 421 | srcs = ["flatbuffer_merge.cc"], |
| 422 | hdrs = ["flatbuffer_merge.h"], |
| 423 | copts = ["-Wno-cast-align"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 424 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 425 | deps = [ |
| 426 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 427 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 428 | "@com_github_google_flatbuffers//:flatbuffers", |
| 429 | ], |
| 430 | ) |
| 431 | |
| 432 | cc_test( |
| 433 | name = "flatbuffer_merge_test", |
| 434 | srcs = [ |
| 435 | "flatbuffer_merge_test.cc", |
| 436 | ], |
| 437 | deps = [ |
| 438 | ":flatbuffer_merge", |
| 439 | ":json_to_flatbuffer", |
| 440 | ":json_to_flatbuffer_flatbuffer", |
| 441 | "//aos/testing:googletest", |
| 442 | ], |
| 443 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 444 | |
| 445 | cc_library( |
| 446 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 447 | srcs = [ |
| 448 | "flatbuffers.cc", |
| 449 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 450 | hdrs = [ |
| 451 | "flatbuffers.h", |
| 452 | ], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 453 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 454 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 455 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame^] | 456 | "//aos/containers:resizeable_buffer", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 457 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 458 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 459 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 460 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 461 | ], |
| 462 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 463 | |
| 464 | cc_test( |
| 465 | name = "configuration_test", |
| 466 | srcs = [ |
| 467 | "configuration_test.cc", |
| 468 | ], |
| 469 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 470 | "//aos/events:pingpong_config", |
Austin Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame] | 471 | "//aos/events:pong.bfbs", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 472 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 473 | ], |
| 474 | deps = [ |
| 475 | ":configuration", |
| 476 | "//aos/testing:googletest", |
| 477 | "//aos/testing:test_logging", |
| 478 | ], |
| 479 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 480 | |
| 481 | cc_binary( |
| 482 | name = "config_flattener", |
| 483 | srcs = [ |
| 484 | "config_flattener.cc", |
| 485 | ], |
| 486 | visibility = ["//visibility:public"], |
| 487 | deps = [ |
| 488 | ":configuration", |
| 489 | ":init", |
| 490 | "//aos/util:file", |
| 491 | "@com_github_google_glog//:glog", |
| 492 | ], |
| 493 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 494 | |
| 495 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 496 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 497 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 498 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 499 | ], |
| 500 | visibility = ["//visibility:public"], |
| 501 | deps = [ |
| 502 | ":configuration", |
| 503 | ":json_to_flatbuffer", |
| 504 | "//aos:init", |
| 505 | "//aos/events:shm_event_loop", |
| 506 | "@com_github_google_glog//:glog", |
| 507 | ], |
| 508 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 509 | |
| 510 | cc_library( |
| 511 | name = "ftrace", |
| 512 | srcs = [ |
| 513 | "ftrace.cc", |
| 514 | ], |
| 515 | hdrs = [ |
| 516 | "ftrace.h", |
| 517 | ], |
| 518 | visibility = ["//visibility:public"], |
| 519 | deps = [ |
| 520 | "@com_github_google_glog//:glog", |
| 521 | ], |
| 522 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 523 | |
| 524 | cc_library( |
| 525 | name = "fast_string_builder", |
| 526 | srcs = [ |
| 527 | "fast_string_builder.cc", |
| 528 | ], |
| 529 | hdrs = [ |
| 530 | "fast_string_builder.h", |
| 531 | ], |
| 532 | deps = [ |
| 533 | "@com_github_google_glog//:glog", |
| 534 | "@com_google_absl//absl/strings", |
| 535 | "@com_google_absl//absl/strings:str_format", |
| 536 | ], |
| 537 | ) |