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", |
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 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame^] | 290 | flatbuffer_ts_library( |
| 291 | name = "configuration_ts_fbs", |
| 292 | srcs = ["configuration.fbs"], |
| 293 | visibility = ["//visibility:public"], |
| 294 | ) |
| 295 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 296 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 297 | name = "configuration_fbs_python", |
| 298 | srcs = ["configuration.fbs"], |
| 299 | namespace = "aos", |
| 300 | tables = [ |
| 301 | "Configuration", |
| 302 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 303 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 304 | "Map", |
| 305 | "Node", |
| 306 | ], |
| 307 | visibility = ["//visibility:public"], |
| 308 | ) |
| 309 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 310 | cc_library( |
| 311 | name = "configuration", |
| 312 | srcs = [ |
| 313 | "configuration.cc", |
| 314 | ], |
| 315 | hdrs = [ |
| 316 | "configuration.h", |
| 317 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 318 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 319 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 320 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 321 | ":flatbuffer_merge", |
| 322 | ":flatbuffers", |
| 323 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 324 | "//aos:unique_malloc_ptr", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 325 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 326 | "//aos/util:file", |
| 327 | "@com_github_google_glog//:glog", |
| 328 | "@com_google_absl//absl/container:btree", |
| 329 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 330 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 331 | ) |
| 332 | |
| 333 | cc_binary( |
| 334 | name = "core", |
| 335 | srcs = [ |
| 336 | "core.cc", |
| 337 | ], |
| 338 | deps = [ |
| 339 | ":init", |
| 340 | "//aos/util:run_command", |
| 341 | ], |
| 342 | ) |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 343 | |
| 344 | cc_library( |
| 345 | name = "make_unique", |
| 346 | hdrs = [ |
| 347 | "make_unique.h", |
| 348 | ], |
| 349 | visibility = ["//visibility:public"], |
| 350 | ) |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 351 | |
| 352 | flatbuffer_cc_library( |
| 353 | name = "json_to_flatbuffer_flatbuffer", |
| 354 | srcs = ["json_to_flatbuffer.fbs"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 355 | gen_reflections = 1, |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 356 | ) |
| 357 | |
| 358 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 359 | name = "flatbuffer_utils", |
| 360 | srcs = ["flatbuffer_utils.cc"], |
| 361 | hdrs = ["flatbuffer_utils.h"], |
| 362 | deps = [ |
| 363 | "@com_github_google_flatbuffers//:flatbuffers", |
| 364 | ], |
| 365 | ) |
| 366 | |
| 367 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 368 | name = "json_tokenizer", |
| 369 | srcs = ["json_tokenizer.cc"], |
| 370 | hdrs = ["json_tokenizer.h"], |
| 371 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 372 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 373 | "@com_google_absl//absl/strings", |
| 374 | ], |
| 375 | ) |
| 376 | |
| 377 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 378 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 379 | srcs = [ |
| 380 | "flatbuffer_introspection.cc", |
| 381 | "json_to_flatbuffer.cc", |
| 382 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 383 | hdrs = ["json_to_flatbuffer.h"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 384 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 385 | deps = [ |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 386 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 387 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 388 | ":json_tokenizer", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 389 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 390 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 391 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 392 | ], |
| 393 | ) |
| 394 | |
| 395 | cc_test( |
| 396 | name = "json_to_flatbuffer_test", |
| 397 | srcs = [ |
| 398 | "json_to_flatbuffer_test.cc", |
| 399 | ], |
| 400 | deps = [ |
| 401 | ":json_to_flatbuffer", |
| 402 | ":json_to_flatbuffer_flatbuffer", |
| 403 | "//aos/testing:googletest", |
| 404 | ], |
| 405 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 406 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 407 | cc_test( |
| 408 | name = "flatbuffer_introspection_test", |
| 409 | srcs = [ |
| 410 | "flatbuffer_introspection_test.cc", |
| 411 | ], |
| 412 | data = [ |
| 413 | ":json_to_flatbuffer_flatbuffer_reflection_out", |
| 414 | ], |
| 415 | deps = [ |
| 416 | ":json_to_flatbuffer", |
| 417 | ":json_to_flatbuffer_flatbuffer", |
| 418 | "//aos/testing:googletest", |
| 419 | "//aos/util:file", |
| 420 | "@com_github_google_flatbuffers//:flatbuffers", |
| 421 | ], |
| 422 | ) |
| 423 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 424 | cc_library( |
| 425 | name = "flatbuffer_merge", |
| 426 | srcs = ["flatbuffer_merge.cc"], |
| 427 | hdrs = ["flatbuffer_merge.h"], |
| 428 | copts = ["-Wno-cast-align"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 429 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 430 | deps = [ |
| 431 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 432 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 433 | "@com_github_google_flatbuffers//:flatbuffers", |
| 434 | ], |
| 435 | ) |
| 436 | |
| 437 | cc_test( |
| 438 | name = "flatbuffer_merge_test", |
| 439 | srcs = [ |
| 440 | "flatbuffer_merge_test.cc", |
| 441 | ], |
| 442 | deps = [ |
| 443 | ":flatbuffer_merge", |
| 444 | ":json_to_flatbuffer", |
| 445 | ":json_to_flatbuffer_flatbuffer", |
| 446 | "//aos/testing:googletest", |
| 447 | ], |
| 448 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 449 | |
| 450 | cc_library( |
| 451 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 452 | srcs = [ |
| 453 | "flatbuffers.cc", |
| 454 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 455 | hdrs = [ |
| 456 | "flatbuffers.h", |
| 457 | ], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 458 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 459 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 460 | "//aos:macros", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 461 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 462 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 463 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 464 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 465 | ], |
| 466 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 467 | |
| 468 | cc_test( |
| 469 | name = "configuration_test", |
| 470 | srcs = [ |
| 471 | "configuration_test.cc", |
| 472 | ], |
| 473 | data = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 474 | "testdata/backwards.json", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 475 | "testdata/config1.json", |
| 476 | "testdata/config1_bad.json", |
Austin Schuh | 8e17be9 | 2019-12-24 09:32:11 -0800 | [diff] [blame] | 477 | "testdata/config1_multinode.json", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 478 | "testdata/config2.json", |
Austin Schuh | 8e17be9 | 2019-12-24 09:32:11 -0800 | [diff] [blame] | 479 | "testdata/config2_multinode.json", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 480 | "testdata/config3.json", |
| 481 | "testdata/expected.json", |
Austin Schuh | 8e17be9 | 2019-12-24 09:32:11 -0800 | [diff] [blame] | 482 | "testdata/expected_multinode.json", |
Austin Schuh | bca6cf0 | 2019-12-22 17:28:34 -0800 | [diff] [blame] | 483 | "testdata/good_multinode.json", |
Brian Silverman | aa2633f | 2020-02-17 21:04:14 -0800 | [diff] [blame] | 484 | "testdata/good_multinode_hostnames.json", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 485 | "testdata/invalid_destination_node.json", |
| 486 | "testdata/invalid_nodes.json", |
| 487 | "testdata/invalid_source_node.json", |
| 488 | "testdata/self_forward.json", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 489 | "//aos/events:pingpong_config.json", |
Austin Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame] | 490 | "//aos/events:pong.bfbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 491 | ], |
| 492 | deps = [ |
| 493 | ":configuration", |
| 494 | "//aos/testing:googletest", |
| 495 | "//aos/testing:test_logging", |
| 496 | ], |
| 497 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 498 | |
| 499 | cc_binary( |
| 500 | name = "config_flattener", |
| 501 | srcs = [ |
| 502 | "config_flattener.cc", |
| 503 | ], |
| 504 | visibility = ["//visibility:public"], |
| 505 | deps = [ |
| 506 | ":configuration", |
| 507 | ":init", |
| 508 | "//aos/util:file", |
| 509 | "@com_github_google_glog//:glog", |
| 510 | ], |
| 511 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 512 | |
| 513 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 514 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 515 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 516 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 517 | ], |
| 518 | visibility = ["//visibility:public"], |
| 519 | deps = [ |
| 520 | ":configuration", |
| 521 | ":json_to_flatbuffer", |
| 522 | "//aos:init", |
| 523 | "//aos/events:shm_event_loop", |
| 524 | "@com_github_google_glog//:glog", |
| 525 | ], |
| 526 | ) |