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