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