Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_rust_library", "flatbuffer_ts_library") |
| 2 | load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 3 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 4 | load("//tools/build_rules:autocxx.bzl", "autocxx_library") |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 5 | |
Austin Schuh | 00e302a | 2020-12-21 11:53:30 -0800 | [diff] [blame] | 6 | exports_files(["aos_dump_autocomplete.sh"]) |
| 7 | |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 8 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 9 | name = "prime_binaries", |
| 10 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 11 | "//aos:aos_dump", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 12 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 13 | "//aos:aos_send", |
Austin Schuh | 91d8d06 | 2020-11-02 17:11:13 -0800 | [diff] [blame] | 14 | "//aos/starter", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 15 | ], |
| 16 | visibility = ["//visibility:public"], |
Austin Schuh | 1eceeb9 | 2015-11-08 21:16:06 -0800 | [diff] [blame] | 17 | ) |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 18 | |
| 19 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 20 | name = "prime_start_binaries", |
| 21 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 22 | "//aos/events/logging:logger_main", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 23 | ], |
| 24 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 25 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 26 | |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 27 | filegroup( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 28 | name = "prime_binaries_stripped", |
| 29 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 30 | "//aos:aos_dump.stripped", |
Tyler Chatow | e6f5bef | 2020-10-31 14:22:04 -0700 | [diff] [blame] | 31 | "//aos:aos_dump_autocomplete.sh", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 32 | "//aos:aos_send.stripped", |
Austin Schuh | 44e0b14 | 2021-10-16 15:51:10 -0700 | [diff] [blame] | 33 | "//aos/starter:starter_stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 34 | ], |
| 35 | visibility = ["//visibility:public"], |
| 36 | ) |
| 37 | |
| 38 | filegroup( |
| 39 | name = "prime_start_binaries_stripped", |
| 40 | srcs = [ |
James Kuszmaul | 38735e8 | 2019-12-07 16:42:06 -0800 | [diff] [blame] | 41 | "//aos/events/logging:logger_main.stripped", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 42 | ], |
| 43 | visibility = ["//visibility:public"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 44 | ) |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 45 | |
| 46 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 47 | name = "math", |
| 48 | hdrs = [ |
| 49 | "commonmath.h", |
| 50 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 51 | visibility = ["//visibility:public"], |
| 52 | ) |
| 53 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 54 | py_library( |
| 55 | name = "python_init", |
| 56 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 57 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 58 | visibility = ["//visibility:public"], |
Sabina Davis | 2ed5ea2 | 2017-09-26 22:27:42 -0700 | [diff] [blame] | 59 | ) |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 60 | |
| 61 | cc_library( |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 62 | name = "macros", |
| 63 | hdrs = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 64 | "macros.h", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 65 | ], |
| 66 | visibility = ["//visibility:public"], |
| 67 | ) |
| 68 | |
| 69 | cc_library( |
| 70 | name = "gtest_prod", |
| 71 | hdrs = [ |
| 72 | "gtest_prod.h", |
| 73 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 74 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 75 | visibility = ["//visibility:public"], |
| 76 | ) |
| 77 | |
| 78 | cc_library( |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 79 | name = "unique_malloc_ptr", |
| 80 | hdrs = [ |
| 81 | "unique_malloc_ptr.h", |
| 82 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 83 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 84 | visibility = ["//visibility:public"], |
| 85 | ) |
| 86 | |
| 87 | cc_library( |
| 88 | name = "condition", |
| 89 | srcs = [ |
| 90 | "condition.cc", |
| 91 | ], |
| 92 | hdrs = [ |
| 93 | "condition.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"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 97 | deps = [ |
| 98 | "//aos/ipc_lib:aos_sync", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 99 | "//aos/mutex", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 100 | "@com_github_google_glog//:glog", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 101 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 102 | ) |
| 103 | |
| 104 | cc_test( |
| 105 | name = "condition_test", |
| 106 | srcs = [ |
| 107 | "condition_test.cc", |
| 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 | deps = [ |
| 111 | ":condition", |
| 112 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 113 | "//aos/ipc_lib:aos_sync", |
| 114 | "//aos/ipc_lib:core_lib", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 115 | "//aos/logging", |
| 116 | "//aos/mutex", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 117 | "//aos/testing:googletest", |
| 118 | "//aos/testing:prevent_exit", |
| 119 | "//aos/testing:test_shm", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 120 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 121 | ], |
| 122 | ) |
| 123 | |
| 124 | cc_library( |
| 125 | name = "die", |
| 126 | srcs = [ |
| 127 | "die.cc", |
| 128 | ], |
| 129 | hdrs = [ |
| 130 | "die.h", |
| 131 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 132 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 133 | visibility = ["//visibility:public"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 134 | deps = [ |
| 135 | "//aos:macros", |
| 136 | "//aos/libc:aos_strerror", |
| 137 | ], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 138 | ) |
| 139 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 140 | cc_test( |
| 141 | name = "die_test", |
| 142 | srcs = [ |
| 143 | "die_test.cc", |
| 144 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 145 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 146 | deps = [ |
| 147 | ":die", |
| 148 | "//aos/testing:googletest", |
| 149 | ], |
| 150 | ) |
| 151 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 152 | cc_binary( |
| 153 | name = "dump_rtprio", |
| 154 | srcs = [ |
| 155 | "dump_rtprio.cc", |
| 156 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 157 | target_compatible_with = ["@platforms//os:linux"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 158 | deps = [ |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 159 | "//aos/time", |
Brian Silverman | 3eb60d2 | 2021-11-04 19:06:47 -0700 | [diff] [blame] | 160 | "@com_github_google_glog//:glog", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 161 | ], |
| 162 | ) |
| 163 | |
| 164 | cc_library( |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 165 | name = "init", |
| 166 | srcs = [ |
| 167 | "init.cc", |
| 168 | ], |
| 169 | hdrs = [ |
| 170 | "init.h", |
| 171 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 172 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 173 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 174 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 175 | ":realtime", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 176 | "//aos:die", |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 177 | "//aos/logging:implementations", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 178 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 179 | ) |
| 180 | |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 181 | autocxx_library( |
| 182 | name = "init_rs", |
| 183 | srcs = ["init.rs"], |
| 184 | crate_name = "aos_init", |
| 185 | libs = [ |
| 186 | ":init", |
| 187 | ], |
| 188 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 189 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 190 | visibility = ["//visibility:public"], |
| 191 | ) |
| 192 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 193 | cc_library( |
| 194 | name = "realtime", |
| 195 | srcs = [ |
| 196 | "realtime.cc", |
| 197 | ], |
| 198 | hdrs = [ |
| 199 | "realtime.h", |
| 200 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 201 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 202 | visibility = ["//visibility:public"], |
| 203 | deps = [ |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 204 | ":thread_local", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 205 | "@com_github_google_glog//:glog", |
| 206 | ], |
| 207 | ) |
| 208 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 209 | flatbuffer_cc_library( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 210 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 211 | srcs = ["configuration.fbs"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 212 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 213 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 214 | visibility = ["//visibility:public"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 215 | ) |
| 216 | |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 217 | cc_static_flatbuffer( |
| 218 | name = "configuration_schema", |
| 219 | function = "aos::ConfigurationSchema", |
| 220 | target = ":configuration_fbs_reflection_out", |
| 221 | visibility = ["//visibility:public"], |
| 222 | ) |
| 223 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 224 | flatbuffer_ts_library( |
| 225 | name = "configuration_ts_fbs", |
| 226 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 227 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 228 | visibility = ["//visibility:public"], |
| 229 | ) |
| 230 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 231 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 232 | name = "configuration_fbs_python", |
| 233 | srcs = ["configuration.fbs"], |
| 234 | namespace = "aos", |
| 235 | tables = [ |
| 236 | "Configuration", |
| 237 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 238 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 239 | "Map", |
| 240 | "Node", |
| 241 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 242 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 243 | visibility = ["//visibility:public"], |
| 244 | ) |
| 245 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 246 | flatbuffer_rust_library( |
| 247 | name = "configuration_rust_fbs", |
| 248 | srcs = ["configuration.fbs"], |
| 249 | crate_name = "aos_configuration_fbs", |
| 250 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 251 | visibility = ["//visibility:public"], |
| 252 | ) |
| 253 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 254 | cc_library( |
| 255 | name = "configuration", |
| 256 | srcs = [ |
| 257 | "configuration.cc", |
| 258 | ], |
| 259 | hdrs = [ |
| 260 | "configuration.h", |
| 261 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 262 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 263 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 264 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 265 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 266 | ":flatbuffer_merge", |
| 267 | ":flatbuffers", |
| 268 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 269 | "//aos:unique_malloc_ptr", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 270 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 271 | "//aos/util:file", |
| 272 | "@com_github_google_glog//:glog", |
| 273 | "@com_google_absl//absl/container:btree", |
| 274 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 275 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 276 | ) |
| 277 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 278 | cc_library( |
| 279 | name = "configuration_for_rust", |
| 280 | srcs = [ |
| 281 | "configuration_for_rust.cc", |
| 282 | ], |
| 283 | hdrs = [ |
| 284 | "configuration_for_rust.h", |
| 285 | ], |
| 286 | deps = [ |
| 287 | ":configuration", |
| 288 | ":for_rust", |
| 289 | "//third_party/cargo:cxx_cc", |
| 290 | ], |
| 291 | ) |
| 292 | |
| 293 | autocxx_library( |
| 294 | name = "configuration_rs", |
| 295 | srcs = ["configuration.rs"], |
| 296 | crate_name = "aos_configuration", |
| 297 | libs = [ |
| 298 | ":configuration", |
| 299 | ":configuration_for_rust", |
| 300 | ":configuration_fbs", |
| 301 | ], |
| 302 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 303 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 304 | visibility = ["//visibility:public"], |
| 305 | deps = [ |
| 306 | ":configuration_rust_fbs", |
| 307 | ":flatbuffers_rs", |
| 308 | "//third_party/cargo:thiserror", |
| 309 | ], |
| 310 | ) |
| 311 | |
| 312 | rust_test( |
| 313 | name = "configuration_rs_test", |
| 314 | crate = ":configuration_rs", |
| 315 | data = [ |
| 316 | "//aos/testdata:test_configs", |
| 317 | ], |
| 318 | # TODO: Make Rust play happy with pic vs nopic. Details at: |
| 319 | # https://github.com/bazelbuild/rules_rust/issues/118 |
| 320 | rustc_flags = ["-Crelocation-model=static"], |
| 321 | ) |
| 322 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 323 | flatbuffer_ts_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 324 | name = "json_to_flatbuffer_fbs_ts", |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 325 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 326 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 327 | visibility = ["//aos:__subpackages__"], |
| 328 | ) |
| 329 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 330 | flatbuffer_cc_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 331 | name = "json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 332 | srcs = ["json_to_flatbuffer.fbs"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 333 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 334 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 335 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 336 | ) |
| 337 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 338 | flatbuffer_rust_library( |
| 339 | name = "json_to_flatbuffer_rust_fbs", |
| 340 | srcs = ["json_to_flatbuffer.fbs"], |
| 341 | crate_name = "aos_json_to_flatbuffer_fbs", |
| 342 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 343 | visibility = ["//aos:__subpackages__"], |
| 344 | ) |
| 345 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 346 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 347 | name = "flatbuffer_utils", |
| 348 | srcs = ["flatbuffer_utils.cc"], |
| 349 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 350 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 351 | visibility = ["//visibility:public"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 352 | deps = [ |
| 353 | "@com_github_google_flatbuffers//:flatbuffers", |
Brian Silverman | cf4fb66 | 2021-02-10 17:54:53 -0800 | [diff] [blame] | 354 | "@com_github_google_glog//:glog", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 355 | ], |
| 356 | ) |
| 357 | |
| 358 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 359 | name = "json_tokenizer", |
| 360 | srcs = ["json_tokenizer.cc"], |
| 361 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 362 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 363 | deps = [ |
Pallavi Madhukar | e2eb281 | 2022-07-19 09:56:09 -0700 | [diff] [blame] | 364 | "@com_github_google_flatbuffers//:flatbuffers", |
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 | bba1028 | 2021-03-20 22:03:28 -0700 | [diff] [blame] | 384 | "//aos/util:file", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 385 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 386 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 387 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 388 | ], |
| 389 | ) |
| 390 | |
| 391 | cc_test( |
| 392 | name = "json_to_flatbuffer_test", |
| 393 | srcs = [ |
| 394 | "json_to_flatbuffer_test.cc", |
| 395 | ], |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 396 | data = [ |
| 397 | ":json_to_flatbuffer_fbs_reflection_out", |
| 398 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 399 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 400 | deps = [ |
| 401 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 402 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 403 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 404 | "//aos/testing:path", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 405 | ], |
| 406 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 407 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 408 | cc_test( |
| 409 | name = "flatbuffer_introspection_test", |
| 410 | srcs = [ |
| 411 | "flatbuffer_introspection_test.cc", |
| 412 | ], |
| 413 | data = [ |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 414 | ":json_to_flatbuffer_fbs_reflection_out", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 415 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 416 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 417 | deps = [ |
| 418 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 419 | ":json_to_flatbuffer_fbs", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 420 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 421 | "//aos/testing:path", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 422 | "//aos/util:file", |
| 423 | "@com_github_google_flatbuffers//:flatbuffers", |
| 424 | ], |
| 425 | ) |
| 426 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 427 | cc_library( |
| 428 | name = "flatbuffer_merge", |
| 429 | srcs = ["flatbuffer_merge.cc"], |
| 430 | hdrs = ["flatbuffer_merge.h"], |
| 431 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 432 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 433 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 434 | deps = [ |
| 435 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 436 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 437 | "@com_github_google_flatbuffers//:flatbuffers", |
| 438 | ], |
| 439 | ) |
| 440 | |
| 441 | cc_test( |
| 442 | name = "flatbuffer_merge_test", |
| 443 | srcs = [ |
| 444 | "flatbuffer_merge_test.cc", |
| 445 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 446 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 447 | deps = [ |
| 448 | ":flatbuffer_merge", |
| 449 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 450 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 451 | "//aos/testing:googletest", |
| 452 | ], |
| 453 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 454 | |
| 455 | cc_library( |
| 456 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 457 | srcs = [ |
| 458 | "flatbuffers.cc", |
| 459 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 460 | hdrs = [ |
| 461 | "flatbuffers.h", |
| 462 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 463 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 464 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 465 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 466 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 467 | "//aos/containers:resizeable_buffer", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 468 | "//aos/util:file", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 469 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 470 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 471 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 472 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 473 | ], |
| 474 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 475 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 476 | rust_library( |
| 477 | name = "flatbuffers_rs", |
| 478 | srcs = ["flatbuffers.rs"], |
| 479 | crate_name = "aos_flatbuffers", |
| 480 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 481 | visibility = ["//visibility:public"], |
| 482 | deps = [ |
| 483 | "@com_github_google_flatbuffers//rust", |
| 484 | ], |
| 485 | ) |
| 486 | |
| 487 | rust_test( |
| 488 | name = "flatbuffers_rs_test", |
| 489 | crate = ":flatbuffers_rs", |
| 490 | deps = [ |
| 491 | ":json_to_flatbuffer_rust_fbs", |
| 492 | ], |
| 493 | ) |
| 494 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 495 | cc_test( |
| 496 | name = "configuration_test", |
| 497 | srcs = [ |
| 498 | "configuration_test.cc", |
| 499 | ], |
| 500 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 501 | "//aos/events:pingpong_config", |
Brian Silverman | dae15a1 | 2022-07-23 12:55:20 -0700 | [diff] [blame] | 502 | "//aos/events:pong_fbs_reflection_out", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 503 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 504 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 505 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 506 | deps = [ |
| 507 | ":configuration", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 508 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 509 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 510 | "//aos/testing:path", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 511 | "//aos/testing:test_logging", |
| 512 | ], |
| 513 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 514 | |
| 515 | cc_binary( |
| 516 | name = "config_flattener", |
| 517 | srcs = [ |
| 518 | "config_flattener.cc", |
| 519 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 520 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 521 | visibility = ["//visibility:public"], |
| 522 | deps = [ |
| 523 | ":configuration", |
| 524 | ":init", |
| 525 | "//aos/util:file", |
| 526 | "@com_github_google_glog//:glog", |
| 527 | ], |
| 528 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 529 | |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 530 | cc_library( |
| 531 | name = "aos_cli_utils", |
| 532 | srcs = [ |
| 533 | "aos_cli_utils.cc", |
| 534 | ], |
| 535 | hdrs = [ |
| 536 | "aos_cli_utils.h", |
| 537 | ], |
| 538 | target_compatible_with = ["@platforms//os:linux"], |
| 539 | visibility = ["//visibility:public"], |
| 540 | deps = [ |
| 541 | ":configuration", |
| 542 | "//aos:init", |
| 543 | "//aos/events:shm_event_loop", |
| 544 | "@com_github_google_glog//:glog", |
| 545 | ], |
| 546 | ) |
| 547 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 548 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 549 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 550 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 551 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 552 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 553 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 554 | visibility = ["//visibility:public"], |
| 555 | deps = [ |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 556 | ":aos_cli_utils", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 557 | ":configuration", |
| 558 | ":json_to_flatbuffer", |
| 559 | "//aos:init", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 560 | "@com_github_google_glog//:glog", |
| 561 | ], |
| 562 | ) |
| 563 | |
| 564 | cc_binary( |
| 565 | name = "aos_send", |
| 566 | srcs = [ |
| 567 | "aos_send.cc", |
| 568 | ], |
| 569 | target_compatible_with = ["@platforms//os:linux"], |
| 570 | visibility = ["//visibility:public"], |
| 571 | deps = [ |
| 572 | ":aos_cli_utils", |
| 573 | ":configuration", |
| 574 | ":init", |
| 575 | ":json_to_flatbuffer", |
| 576 | "@com_github_gflags_gflags//:gflags", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 577 | "@com_github_google_glog//:glog", |
| 578 | ], |
| 579 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 580 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 581 | cc_binary( |
| 582 | name = "aos_graph_nodes", |
| 583 | srcs = [ |
| 584 | "aos_graph_nodes.cc", |
| 585 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 586 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 587 | visibility = ["//visibility:public"], |
| 588 | deps = [ |
| 589 | ":configuration", |
| 590 | ":json_to_flatbuffer", |
| 591 | "//aos:init", |
| 592 | "//aos/events:shm_event_loop", |
| 593 | "@com_github_google_glog//:glog", |
| 594 | ], |
| 595 | ) |
| 596 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 597 | cc_library( |
| 598 | name = "ftrace", |
| 599 | srcs = [ |
| 600 | "ftrace.cc", |
| 601 | ], |
| 602 | hdrs = [ |
| 603 | "ftrace.h", |
| 604 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 605 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 606 | visibility = ["//visibility:public"], |
| 607 | deps = [ |
| 608 | "@com_github_google_glog//:glog", |
| 609 | ], |
| 610 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 611 | |
| 612 | cc_library( |
| 613 | name = "fast_string_builder", |
| 614 | srcs = [ |
| 615 | "fast_string_builder.cc", |
| 616 | ], |
| 617 | hdrs = [ |
| 618 | "fast_string_builder.h", |
| 619 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 620 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 621 | visibility = ["//visibility:public"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 622 | deps = [ |
| 623 | "@com_github_google_glog//:glog", |
| 624 | "@com_google_absl//absl/strings", |
| 625 | "@com_google_absl//absl/strings:str_format", |
| 626 | ], |
| 627 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 628 | |
| 629 | cc_library( |
| 630 | name = "thread_local", |
| 631 | hdrs = [ |
| 632 | "thread_local.h", |
| 633 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 634 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 635 | visibility = ["//visibility:public"], |
| 636 | ) |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 637 | |
| 638 | cc_test( |
| 639 | name = "realtime_test", |
| 640 | srcs = [ |
| 641 | "realtime_test.cc", |
| 642 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 643 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 644 | visibility = ["//visibility:public"], |
| 645 | deps = [ |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 646 | ":init", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 647 | ":realtime", |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 648 | "@com_github_gflags_gflags//:gflags", |
| 649 | "@com_github_google_glog//:glog", |
| 650 | "@com_google_googletest//:gtest", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 651 | ], |
| 652 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 653 | |
| 654 | cc_test( |
| 655 | name = "flatbuffers_test", |
| 656 | srcs = [ |
| 657 | "flatbuffers_test.cc", |
| 658 | ], |
| 659 | deps = [ |
| 660 | ":flatbuffers", |
| 661 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 662 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 663 | "//aos/testing:googletest", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 664 | "//aos/testing:tmpdir", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 665 | ], |
| 666 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 667 | |
| 668 | py_binary( |
| 669 | name = "flatbuffers_static", |
| 670 | srcs = ["flatbuffers_static.py"], |
| 671 | visibility = ["//visibility:public"], |
| 672 | ) |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 673 | |
| 674 | cc_library( |
| 675 | name = "uuid", |
| 676 | srcs = ["uuid.cc"], |
| 677 | hdrs = ["uuid.h"], |
| 678 | target_compatible_with = ["@platforms//os:linux"], |
| 679 | visibility = ["//visibility:public"], |
| 680 | deps = [ |
Austin Schuh | 8902fa5 | 2021-03-14 22:39:24 -0700 | [diff] [blame] | 681 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 682 | "@com_github_google_flatbuffers//:flatbuffers", |
| 683 | "@com_github_google_glog//:glog", |
| 684 | "@com_google_absl//absl/types:span", |
| 685 | ], |
| 686 | ) |
| 687 | |
| 688 | cc_test( |
| 689 | name = "uuid_test", |
| 690 | srcs = ["uuid_test.cc"], |
| 691 | target_compatible_with = ["@platforms//os:linux"], |
| 692 | deps = [ |
| 693 | ":uuid", |
| 694 | "//aos/testing:googletest", |
| 695 | ], |
| 696 | ) |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 697 | |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame^] | 698 | cc_library( |
| 699 | name = "uuid_for_rust", |
| 700 | hdrs = ["uuid_for_rust.h"], |
| 701 | deps = [ |
| 702 | ":uuid", |
| 703 | ], |
| 704 | ) |
| 705 | |
| 706 | autocxx_library( |
| 707 | name = "uuid_rs", |
| 708 | srcs = ["uuid.rs"], |
| 709 | crate_name = "aos_uuid", |
| 710 | libs = [ |
| 711 | ":uuid", |
| 712 | ":uuid_for_rust", |
| 713 | ], |
| 714 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 715 | rs_deps = [ |
| 716 | "//third_party/cargo:uuid", |
| 717 | ], |
| 718 | target_compatible_with = ["//tools/platforms/rust:has_support"], |
| 719 | visibility = ["//visibility:public"], |
| 720 | ) |
| 721 | |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 722 | cc_binary( |
| 723 | name = "aos_graph_channels", |
| 724 | srcs = [ |
| 725 | "aos_graph_channels.cc", |
| 726 | ], |
| 727 | target_compatible_with = ["@platforms//os:linux"], |
| 728 | deps = [ |
| 729 | "//aos:configuration", |
| 730 | "//aos:init", |
| 731 | "//aos:json_to_flatbuffer", |
| 732 | "//aos/events:simulated_event_loop", |
| 733 | "//aos/events/logging:log_reader", |
| 734 | "//aos/time", |
| 735 | "@com_github_gflags_gflags//:gflags", |
| 736 | "@com_github_google_glog//:glog", |
| 737 | ], |
| 738 | ) |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 739 | |
| 740 | cc_library( |
| 741 | name = "for_rust", |
| 742 | hdrs = [ |
| 743 | "for_rust.h", |
| 744 | ], |
| 745 | visibility = ["//visibility:public"], |
| 746 | deps = [ |
| 747 | "//third_party/cargo:cxx_cc", |
| 748 | ], |
| 749 | ) |