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 = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 18 | "//aos/logging:binary_log_writer", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 19 | ], |
| 20 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 21 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 22 | |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 23 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 24 | name = "prime_binaries_stripped", |
| 25 | srcs = [ |
| 26 | # starter is hard coded to look for a non-stripped core... |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 27 | "//aos:core", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 28 | "//aos/logging:log_streamer.stripped", |
| 29 | "//aos/logging:log_displayer.stripped", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 30 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 31 | ], |
| 32 | visibility = ["//visibility:public"], |
| 33 | ) |
| 34 | |
| 35 | filegroup( |
| 36 | name = "prime_start_binaries_stripped", |
| 37 | srcs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 38 | "//aos/logging:binary_log_writer.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 39 | ], |
| 40 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 41 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 42 | |
| 43 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 44 | name = "math", |
| 45 | hdrs = [ |
| 46 | "commonmath.h", |
| 47 | ], |
| 48 | compatible_with = mcu_cpus, |
| 49 | visibility = ["//visibility:public"], |
| 50 | ) |
| 51 | |
| 52 | cc_library( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 53 | name = "once", |
| 54 | srcs = [ |
| 55 | "once-tmpl.h", |
| 56 | ], |
| 57 | hdrs = [ |
| 58 | "once.h", |
| 59 | ], |
| 60 | visibility = ["//visibility:public"], |
| 61 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 62 | "//aos:gtest_prod", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 63 | "//aos/type_traits", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 64 | ], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 65 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 66 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 67 | cc_library( |
| 68 | name = "byteorder", |
| 69 | hdrs = [ |
| 70 | "byteorder.h", |
| 71 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 72 | visibility = ["//visibility:public"], |
| 73 | ) |
| 74 | |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 75 | cc_test( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 76 | name = "once_test", |
| 77 | srcs = [ |
| 78 | "once_test.cc", |
| 79 | ], |
| 80 | visibility = ["//visibility:public"], |
| 81 | deps = [ |
| 82 | "//aos:once", |
| 83 | "//aos/testing:googletest", |
| 84 | ], |
| 85 | ) |
| 86 | |
| 87 | py_library( |
| 88 | name = "python_init", |
| 89 | srcs = ["__init__.py"], |
| 90 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 91 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 92 | |
| 93 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 94 | name = "macros", |
| 95 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 96 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 97 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 98 | compatible_with = mcu_cpus, |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 99 | visibility = ["//visibility:public"], |
| 100 | ) |
| 101 | |
| 102 | cc_library( |
| 103 | name = "gtest_prod", |
| 104 | hdrs = [ |
| 105 | "gtest_prod.h", |
| 106 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 107 | visibility = ["//visibility:public"], |
| 108 | ) |
| 109 | |
| 110 | cc_library( |
| 111 | name = "network_port", |
| 112 | hdrs = [ |
| 113 | "network_port.h", |
| 114 | ], |
| 115 | visibility = ["//visibility:public"], |
| 116 | ) |
| 117 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 118 | cc_library( |
| 119 | name = "unique_malloc_ptr", |
| 120 | hdrs = [ |
| 121 | "unique_malloc_ptr.h", |
| 122 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 123 | visibility = ["//visibility:public"], |
| 124 | ) |
| 125 | |
| 126 | cc_library( |
| 127 | name = "condition", |
| 128 | srcs = [ |
| 129 | "condition.cc", |
| 130 | ], |
| 131 | hdrs = [ |
| 132 | "condition.h", |
| 133 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 134 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 135 | deps = [ |
| 136 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 137 | "//aos/mutex", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 138 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 139 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 140 | ) |
| 141 | |
| 142 | cc_test( |
| 143 | name = "condition_test", |
| 144 | srcs = [ |
| 145 | "condition_test.cc", |
| 146 | ], |
| 147 | deps = [ |
| 148 | ":condition", |
| 149 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 150 | "//aos/ipc_lib:aos_sync", |
| 151 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 152 | "//aos/logging", |
| 153 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 154 | "//aos/testing:googletest", |
| 155 | "//aos/testing:prevent_exit", |
| 156 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 157 | "//aos/time", |
| 158 | "//aos/util:thread", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 159 | ], |
| 160 | ) |
| 161 | |
| 162 | cc_library( |
| 163 | name = "die", |
| 164 | srcs = [ |
| 165 | "die.cc", |
| 166 | ], |
| 167 | hdrs = [ |
| 168 | "die.h", |
| 169 | ], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 170 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 171 | deps = [ |
| 172 | "//aos:macros", |
| 173 | "//aos/libc:aos_strerror", |
| 174 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 175 | ) |
| 176 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 177 | cc_test( |
| 178 | name = "die_test", |
| 179 | srcs = [ |
| 180 | "die_test.cc", |
| 181 | ], |
| 182 | deps = [ |
| 183 | ":die", |
| 184 | "//aos/testing:googletest", |
| 185 | ], |
| 186 | ) |
| 187 | |
| 188 | cc_library( |
| 189 | name = "event", |
| 190 | srcs = [ |
| 191 | "event.cc", |
| 192 | ], |
| 193 | hdrs = [ |
| 194 | "event.h", |
| 195 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 196 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 197 | deps = [ |
| 198 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 199 | "//aos/time", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 200 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 201 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 202 | ) |
| 203 | |
| 204 | cc_test( |
| 205 | name = "event_test", |
| 206 | srcs = [ |
| 207 | "event_test.cc", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 208 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 209 | deps = [ |
| 210 | ":event", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 211 | "//aos/testing:googletest", |
| 212 | "//aos/testing:test_logging", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 213 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 214 | ], |
| 215 | ) |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 216 | |
| 217 | cc_binary( |
| 218 | name = "dump_rtprio", |
| 219 | srcs = [ |
| 220 | "dump_rtprio.cc", |
| 221 | ], |
| 222 | deps = [ |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 223 | "//aos/logging", |
| 224 | "//aos/logging:implementations", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 225 | "//aos/time", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 226 | ], |
| 227 | ) |
| 228 | |
| 229 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 230 | name = "complex_thread_local", |
| 231 | srcs = [ |
| 232 | "complex_thread_local.cc", |
| 233 | ], |
| 234 | hdrs = [ |
| 235 | "complex_thread_local.h", |
| 236 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 237 | linkopts = [ |
| 238 | "-lpthread", |
| 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 | 7bca981 | 2019-10-14 21:23:45 -0700 | [diff] [blame] | 311 | "@com_google_absl//absl/base", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 312 | "//aos:unique_malloc_ptr", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 313 | "//aos/util:file", |
| 314 | "@com_github_google_glog//:glog", |
| 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"], |
| 342 | ) |
| 343 | |
| 344 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 345 | name = "flatbuffer_utils", |
| 346 | srcs = ["flatbuffer_utils.cc"], |
| 347 | hdrs = ["flatbuffer_utils.h"], |
| 348 | deps = [ |
| 349 | "@com_github_google_flatbuffers//:flatbuffers", |
| 350 | ], |
| 351 | ) |
| 352 | |
| 353 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 354 | name = "json_tokenizer", |
| 355 | srcs = ["json_tokenizer.cc"], |
| 356 | hdrs = ["json_tokenizer.h"], |
| 357 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 358 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 359 | "@com_google_absl//absl/strings", |
| 360 | ], |
| 361 | ) |
| 362 | |
| 363 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 364 | name = "json_to_flatbuffer", |
| 365 | srcs = ["json_to_flatbuffer.cc"], |
| 366 | hdrs = ["json_to_flatbuffer.h"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 367 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 368 | deps = [ |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 369 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 370 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 371 | ":json_tokenizer", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 372 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 373 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 374 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 375 | ], |
| 376 | ) |
| 377 | |
| 378 | cc_test( |
| 379 | name = "json_to_flatbuffer_test", |
| 380 | srcs = [ |
| 381 | "json_to_flatbuffer_test.cc", |
| 382 | ], |
| 383 | deps = [ |
| 384 | ":json_to_flatbuffer", |
| 385 | ":json_to_flatbuffer_flatbuffer", |
| 386 | "//aos/testing:googletest", |
| 387 | ], |
| 388 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 389 | |
| 390 | cc_library( |
| 391 | name = "flatbuffer_merge", |
| 392 | srcs = ["flatbuffer_merge.cc"], |
| 393 | hdrs = ["flatbuffer_merge.h"], |
| 394 | copts = ["-Wno-cast-align"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 395 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 396 | deps = [ |
| 397 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 398 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 399 | "@com_github_google_flatbuffers//:flatbuffers", |
| 400 | ], |
| 401 | ) |
| 402 | |
| 403 | cc_test( |
| 404 | name = "flatbuffer_merge_test", |
| 405 | srcs = [ |
| 406 | "flatbuffer_merge_test.cc", |
| 407 | ], |
| 408 | deps = [ |
| 409 | ":flatbuffer_merge", |
| 410 | ":json_to_flatbuffer", |
| 411 | ":json_to_flatbuffer_flatbuffer", |
| 412 | "//aos/testing:googletest", |
| 413 | ], |
| 414 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 415 | |
| 416 | cc_library( |
| 417 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 418 | srcs = [ |
| 419 | "flatbuffers.cc", |
| 420 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 421 | hdrs = [ |
| 422 | "flatbuffers.h", |
| 423 | ], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 424 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 425 | deps = [ |
| 426 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 427 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 428 | "@com_google_absl//absl/strings", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 429 | ], |
| 430 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 431 | |
| 432 | cc_test( |
| 433 | name = "configuration_test", |
| 434 | srcs = [ |
| 435 | "configuration_test.cc", |
| 436 | ], |
| 437 | data = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 438 | "testdata/backwards.json", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 439 | "testdata/config1.json", |
| 440 | "testdata/config1_bad.json", |
| 441 | "testdata/config2.json", |
| 442 | "testdata/config3.json", |
| 443 | "testdata/expected.json", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 444 | "//aos/events:config.fb.json", |
| 445 | "//aos/events:pingpong.bfbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 446 | ], |
| 447 | deps = [ |
| 448 | ":configuration", |
| 449 | "//aos/testing:googletest", |
| 450 | "//aos/testing:test_logging", |
| 451 | ], |
| 452 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 453 | |
| 454 | cc_binary( |
| 455 | name = "config_flattener", |
| 456 | srcs = [ |
| 457 | "config_flattener.cc", |
| 458 | ], |
| 459 | visibility = ["//visibility:public"], |
| 460 | deps = [ |
| 461 | ":configuration", |
| 462 | ":init", |
| 463 | "//aos/util:file", |
| 464 | "@com_github_google_glog//:glog", |
| 465 | ], |
| 466 | ) |