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