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