Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 1 | 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] | 2 | |
Austin Schuh | 00e302a | 2020-12-21 11:53:30 -0800 | [diff] [blame] | 3 | exports_files(["aos_dump_autocomplete.sh"]) |
| 4 | |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 5 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 6 | name = "prime_binaries", |
| 7 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 8 | "//aos:aos_dump", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 9 | "//aos:aos_dump_autocomplete.sh", |
Austin Schuh | 91d8d06 | 2020-11-02 17:11:13 -0800 | [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", |
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... |
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", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 29 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 30 | ], |
| 31 | visibility = ["//visibility:public"], |
| 32 | ) |
| 33 | |
| 34 | filegroup( |
| 35 | name = "prime_start_binaries_stripped", |
| 36 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 37 | "//aos/events/logging:logger_main.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 38 | ], |
| 39 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 40 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 41 | |
| 42 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 43 | name = "math", |
| 44 | hdrs = [ |
| 45 | "commonmath.h", |
| 46 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 47 | visibility = ["//visibility:public"], |
| 48 | ) |
| 49 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 50 | py_library( |
| 51 | name = "python_init", |
| 52 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 53 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 54 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 55 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 56 | |
| 57 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 58 | name = "macros", |
| 59 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 60 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 61 | ], |
| 62 | visibility = ["//visibility:public"], |
| 63 | ) |
| 64 | |
| 65 | cc_library( |
| 66 | name = "gtest_prod", |
| 67 | hdrs = [ |
| 68 | "gtest_prod.h", |
| 69 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 70 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 71 | visibility = ["//visibility:public"], |
| 72 | ) |
| 73 | |
| 74 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 75 | name = "unique_malloc_ptr", |
| 76 | hdrs = [ |
| 77 | "unique_malloc_ptr.h", |
| 78 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 79 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 80 | visibility = ["//visibility:public"], |
| 81 | ) |
| 82 | |
| 83 | cc_library( |
| 84 | name = "condition", |
| 85 | srcs = [ |
| 86 | "condition.cc", |
| 87 | ], |
| 88 | hdrs = [ |
| 89 | "condition.h", |
| 90 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 91 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 92 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 93 | deps = [ |
| 94 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 95 | "//aos/mutex", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 96 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 97 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 98 | ) |
| 99 | |
| 100 | cc_test( |
| 101 | name = "condition_test", |
| 102 | srcs = [ |
| 103 | "condition_test.cc", |
| 104 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 105 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 106 | deps = [ |
| 107 | ":condition", |
| 108 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 109 | "//aos/ipc_lib:aos_sync", |
| 110 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 111 | "//aos/logging", |
| 112 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 113 | "//aos/testing:googletest", |
| 114 | "//aos/testing:prevent_exit", |
| 115 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 116 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 117 | ], |
| 118 | ) |
| 119 | |
| 120 | cc_library( |
| 121 | name = "die", |
| 122 | srcs = [ |
| 123 | "die.cc", |
| 124 | ], |
| 125 | hdrs = [ |
| 126 | "die.h", |
| 127 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 128 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 129 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 130 | deps = [ |
| 131 | "//aos:macros", |
| 132 | "//aos/libc:aos_strerror", |
| 133 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 134 | ) |
| 135 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 136 | cc_test( |
| 137 | name = "die_test", |
| 138 | srcs = [ |
| 139 | "die_test.cc", |
| 140 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 141 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 142 | deps = [ |
| 143 | ":die", |
| 144 | "//aos/testing:googletest", |
| 145 | ], |
| 146 | ) |
| 147 | |
| 148 | cc_library( |
| 149 | name = "event", |
| 150 | srcs = [ |
| 151 | "event.cc", |
| 152 | ], |
| 153 | hdrs = [ |
| 154 | "event.h", |
| 155 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 156 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 157 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 158 | deps = [ |
| 159 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 160 | "//aos/time", |
Austin Schuh | 91d8d06 | 2020-11-02 17:11:13 -0800 | [diff] [blame] | 161 | "//aos/type_traits", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 162 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 163 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 164 | ) |
| 165 | |
| 166 | cc_test( |
| 167 | name = "event_test", |
| 168 | srcs = [ |
| 169 | "event_test.cc", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 170 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 171 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 172 | deps = [ |
| 173 | ":event", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 174 | "//aos/testing:googletest", |
| 175 | "//aos/testing:test_logging", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 176 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 177 | ], |
| 178 | ) |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 179 | |
| 180 | cc_binary( |
| 181 | name = "dump_rtprio", |
| 182 | srcs = [ |
| 183 | "dump_rtprio.cc", |
| 184 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 185 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 186 | deps = [ |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 187 | "//aos/logging", |
| 188 | "//aos/logging:implementations", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 189 | "//aos/time", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 190 | ], |
| 191 | ) |
| 192 | |
| 193 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 194 | name = "complex_thread_local", |
| 195 | srcs = [ |
| 196 | "complex_thread_local.cc", |
| 197 | ], |
| 198 | hdrs = [ |
| 199 | "complex_thread_local.h", |
| 200 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 201 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 202 | visibility = ["//visibility:public"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 203 | deps = [ |
| 204 | "//aos:die", |
John Park | 65170ac | 2020-01-08 20:15:24 -0800 | [diff] [blame] | 205 | "@com_google_absl//absl/base", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 206 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 207 | ) |
| 208 | |
| 209 | cc_test( |
| 210 | name = "complex_thread_local_test", |
| 211 | srcs = [ |
| 212 | "complex_thread_local_test.cc", |
| 213 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 214 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 215 | deps = [ |
| 216 | ":complex_thread_local", |
| 217 | "//aos/logging", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 218 | "//aos/testing:googletest", |
| 219 | ], |
| 220 | ) |
| 221 | |
| 222 | cc_library( |
| 223 | name = "init", |
| 224 | srcs = [ |
| 225 | "init.cc", |
| 226 | ], |
| 227 | hdrs = [ |
| 228 | "init.h", |
| 229 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 230 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 231 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 232 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 233 | ":realtime", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 234 | "//aos:die", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 235 | "//aos/logging:implementations", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 236 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 237 | ) |
| 238 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 239 | cc_library( |
| 240 | name = "realtime", |
| 241 | srcs = [ |
| 242 | "realtime.cc", |
| 243 | ], |
| 244 | hdrs = [ |
| 245 | "realtime.h", |
| 246 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 247 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 248 | visibility = ["//visibility:public"], |
| 249 | deps = [ |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 250 | ":thread_local", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 251 | "@com_github_google_glog//:glog", |
| 252 | ], |
| 253 | ) |
| 254 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 255 | flatbuffer_cc_library( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 256 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 257 | srcs = ["configuration.fbs"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 258 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 259 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 260 | visibility = ["//visibility:public"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 261 | ) |
| 262 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 263 | flatbuffer_ts_library( |
| 264 | name = "configuration_ts_fbs", |
| 265 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 266 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 267 | visibility = ["//visibility:public"], |
| 268 | ) |
| 269 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 270 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 271 | name = "configuration_fbs_python", |
| 272 | srcs = ["configuration.fbs"], |
| 273 | namespace = "aos", |
| 274 | tables = [ |
| 275 | "Configuration", |
| 276 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 277 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 278 | "Map", |
| 279 | "Node", |
| 280 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 281 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 282 | visibility = ["//visibility:public"], |
| 283 | ) |
| 284 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 285 | cc_library( |
| 286 | name = "configuration", |
| 287 | srcs = [ |
| 288 | "configuration.cc", |
| 289 | ], |
| 290 | hdrs = [ |
| 291 | "configuration.h", |
| 292 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 293 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 294 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 295 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 296 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 297 | ":flatbuffer_merge", |
| 298 | ":flatbuffers", |
| 299 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 300 | "//aos:unique_malloc_ptr", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 301 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 302 | "//aos/util:file", |
| 303 | "@com_github_google_glog//:glog", |
| 304 | "@com_google_absl//absl/container:btree", |
| 305 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 306 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 307 | ) |
| 308 | |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 309 | cc_library( |
| 310 | name = "make_unique", |
| 311 | hdrs = [ |
| 312 | "make_unique.h", |
| 313 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 314 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 315 | visibility = ["//visibility:public"], |
| 316 | ) |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 317 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 318 | flatbuffer_ts_library( |
| 319 | name = "json_to_flatbuffer_flatbuffer_ts", |
| 320 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 321 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 322 | visibility = ["//aos:__subpackages__"], |
| 323 | ) |
| 324 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 325 | flatbuffer_cc_library( |
| 326 | name = "json_to_flatbuffer_flatbuffer", |
| 327 | srcs = ["json_to_flatbuffer.fbs"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 328 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 329 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 330 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 331 | ) |
| 332 | |
| 333 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 334 | name = "flatbuffer_utils", |
| 335 | srcs = ["flatbuffer_utils.cc"], |
| 336 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 337 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 338 | deps = [ |
| 339 | "@com_github_google_flatbuffers//:flatbuffers", |
Brian Silverman | cf4fb66 | 2021-02-10 17:54:53 -0800 | [diff] [blame^] | 340 | "@com_github_google_glog//:glog", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 341 | ], |
| 342 | ) |
| 343 | |
| 344 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 345 | name = "json_tokenizer", |
| 346 | srcs = ["json_tokenizer.cc"], |
| 347 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 348 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 349 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 350 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 351 | "@com_google_absl//absl/strings", |
| 352 | ], |
| 353 | ) |
| 354 | |
| 355 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 356 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 357 | srcs = [ |
| 358 | "flatbuffer_introspection.cc", |
| 359 | "json_to_flatbuffer.cc", |
| 360 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 361 | hdrs = ["json_to_flatbuffer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 362 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 363 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 364 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 365 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 366 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 367 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 368 | ":json_tokenizer", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 369 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 370 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 371 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 372 | ], |
| 373 | ) |
| 374 | |
| 375 | cc_test( |
| 376 | name = "json_to_flatbuffer_test", |
| 377 | srcs = [ |
| 378 | "json_to_flatbuffer_test.cc", |
| 379 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 380 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 381 | deps = [ |
| 382 | ":json_to_flatbuffer", |
| 383 | ":json_to_flatbuffer_flatbuffer", |
| 384 | "//aos/testing:googletest", |
| 385 | ], |
| 386 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 387 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 388 | cc_test( |
| 389 | name = "flatbuffer_introspection_test", |
| 390 | srcs = [ |
| 391 | "flatbuffer_introspection_test.cc", |
| 392 | ], |
| 393 | data = [ |
| 394 | ":json_to_flatbuffer_flatbuffer_reflection_out", |
| 395 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 396 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 397 | deps = [ |
| 398 | ":json_to_flatbuffer", |
| 399 | ":json_to_flatbuffer_flatbuffer", |
| 400 | "//aos/testing:googletest", |
| 401 | "//aos/util:file", |
| 402 | "@com_github_google_flatbuffers//:flatbuffers", |
| 403 | ], |
| 404 | ) |
| 405 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 406 | cc_library( |
| 407 | name = "flatbuffer_merge", |
| 408 | srcs = ["flatbuffer_merge.cc"], |
| 409 | hdrs = ["flatbuffer_merge.h"], |
| 410 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 411 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 412 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 413 | deps = [ |
| 414 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 415 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 416 | "@com_github_google_flatbuffers//:flatbuffers", |
| 417 | ], |
| 418 | ) |
| 419 | |
| 420 | cc_test( |
| 421 | name = "flatbuffer_merge_test", |
| 422 | srcs = [ |
| 423 | "flatbuffer_merge_test.cc", |
| 424 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 425 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 426 | deps = [ |
| 427 | ":flatbuffer_merge", |
| 428 | ":json_to_flatbuffer", |
| 429 | ":json_to_flatbuffer_flatbuffer", |
| 430 | "//aos/testing:googletest", |
| 431 | ], |
| 432 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 433 | |
| 434 | cc_library( |
| 435 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 436 | srcs = [ |
| 437 | "flatbuffers.cc", |
| 438 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 439 | hdrs = [ |
| 440 | "flatbuffers.h", |
| 441 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 442 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 443 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 444 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 445 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 446 | "//aos/containers:resizeable_buffer", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 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 | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 450 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 451 | ], |
| 452 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 453 | |
| 454 | cc_test( |
| 455 | name = "configuration_test", |
| 456 | srcs = [ |
| 457 | "configuration_test.cc", |
| 458 | ], |
| 459 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 460 | "//aos/events:pingpong_config", |
Austin Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame] | 461 | "//aos/events:pong.bfbs", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 462 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 463 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 464 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 465 | deps = [ |
| 466 | ":configuration", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 467 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 468 | "//aos/testing:googletest", |
| 469 | "//aos/testing:test_logging", |
| 470 | ], |
| 471 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 472 | |
| 473 | cc_binary( |
| 474 | name = "config_flattener", |
| 475 | srcs = [ |
| 476 | "config_flattener.cc", |
| 477 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 478 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 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( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 489 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 490 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 491 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 492 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 493 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 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 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 503 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 504 | cc_binary( |
| 505 | name = "aos_graph_nodes", |
| 506 | srcs = [ |
| 507 | "aos_graph_nodes.cc", |
| 508 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 509 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 510 | visibility = ["//visibility:public"], |
| 511 | deps = [ |
| 512 | ":configuration", |
| 513 | ":json_to_flatbuffer", |
| 514 | "//aos:init", |
| 515 | "//aos/events:shm_event_loop", |
| 516 | "@com_github_google_glog//:glog", |
| 517 | ], |
| 518 | ) |
| 519 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 520 | cc_library( |
| 521 | name = "ftrace", |
| 522 | srcs = [ |
| 523 | "ftrace.cc", |
| 524 | ], |
| 525 | hdrs = [ |
| 526 | "ftrace.h", |
| 527 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 528 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 529 | visibility = ["//visibility:public"], |
| 530 | deps = [ |
| 531 | "@com_github_google_glog//:glog", |
| 532 | ], |
| 533 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 534 | |
| 535 | cc_library( |
| 536 | name = "fast_string_builder", |
| 537 | srcs = [ |
| 538 | "fast_string_builder.cc", |
| 539 | ], |
| 540 | hdrs = [ |
| 541 | "fast_string_builder.h", |
| 542 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 543 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 544 | deps = [ |
| 545 | "@com_github_google_glog//:glog", |
| 546 | "@com_google_absl//absl/strings", |
| 547 | "@com_google_absl//absl/strings:str_format", |
| 548 | ], |
| 549 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 550 | |
| 551 | cc_library( |
| 552 | name = "thread_local", |
| 553 | hdrs = [ |
| 554 | "thread_local.h", |
| 555 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 556 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 557 | visibility = ["//visibility:public"], |
| 558 | ) |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 559 | |
| 560 | cc_test( |
| 561 | name = "realtime_test", |
| 562 | srcs = [ |
| 563 | "realtime_test.cc", |
| 564 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 565 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 566 | visibility = ["//visibility:public"], |
| 567 | deps = [ |
| 568 | ":realtime", |
| 569 | "//aos/testing:googletest", |
| 570 | ], |
| 571 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 572 | |
| 573 | cc_test( |
| 574 | name = "flatbuffers_test", |
| 575 | srcs = [ |
| 576 | "flatbuffers_test.cc", |
| 577 | ], |
| 578 | deps = [ |
| 579 | ":flatbuffers", |
| 580 | ":json_to_flatbuffer", |
| 581 | ":json_to_flatbuffer_flatbuffer", |
| 582 | "//aos/testing:googletest", |
| 583 | ], |
| 584 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 585 | |
| 586 | py_binary( |
| 587 | name = "flatbuffers_static", |
| 588 | srcs = ["flatbuffers_static.py"], |
| 589 | visibility = ["//visibility:public"], |
| 590 | ) |