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