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