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