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