Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_rust_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") |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 4 | load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 5 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 6 | load("//tools/build_rules:autocxx.bzl", "autocxx_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", |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 212 | target_compatible_with = select({ |
| 213 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 214 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 215 | }), |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 216 | visibility = ["//visibility:public"], |
Adam Snaider | 48a62f3 | 2023-10-02 15:49:23 -0700 | [diff] [blame^] | 217 | deps = [ |
| 218 | "@crate_index//:clap", |
| 219 | ], |
| 220 | ) |
| 221 | |
| 222 | rust_test( |
| 223 | name = "init_rs_test", |
| 224 | crate = ":init_rs", |
| 225 | rustc_flags = ["-Crelocation-model=static"], |
| 226 | target_compatible_with = select({ |
| 227 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 228 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 229 | }), |
Brian Silverman | e4c79ce | 2022-08-15 05:57:28 -0700 | [diff] [blame] | 230 | ) |
| 231 | |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 232 | autocxx_library( |
| 233 | name = "test_init_rs", |
| 234 | testonly = True, |
| 235 | srcs = ["test_init.rs"], |
| 236 | crate_name = "aos_test_init", |
| 237 | libs = [ |
| 238 | "//aos/testing:tmpdir", |
| 239 | ], |
| 240 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 241 | target_compatible_with = select({ |
| 242 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 243 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 244 | }), |
| 245 | visibility = ["//visibility:public"], |
| 246 | deps = [ |
| 247 | ":init_rs", |
| 248 | ], |
| 249 | ) |
| 250 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 251 | cc_library( |
| 252 | name = "realtime", |
| 253 | srcs = [ |
| 254 | "realtime.cc", |
| 255 | ], |
| 256 | hdrs = [ |
| 257 | "realtime.h", |
| 258 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 259 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 260 | visibility = ["//visibility:public"], |
| 261 | deps = [ |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 262 | ":uuid", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 263 | "@com_github_google_glog//:glog", |
| 264 | ], |
| 265 | ) |
| 266 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 267 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 268 | name = "configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 269 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 270 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 271 | visibility = ["//visibility:public"], |
James Kuszmaul | 1e57af9 | 2023-12-20 15:34:54 -0800 | [diff] [blame] | 272 | deps = ["//aos/flatbuffers/reflection:reflection_fbs"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 273 | ) |
| 274 | |
James Kuszmaul | e4aa01d | 2022-06-28 14:09:02 -0700 | [diff] [blame] | 275 | cc_static_flatbuffer( |
| 276 | name = "configuration_schema", |
| 277 | function = "aos::ConfigurationSchema", |
| 278 | target = ":configuration_fbs_reflection_out", |
| 279 | visibility = ["//visibility:public"], |
| 280 | ) |
| 281 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 282 | flatbuffer_ts_library( |
| 283 | name = "configuration_ts_fbs", |
| 284 | srcs = ["configuration.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 285 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 286 | visibility = ["//visibility:public"], |
| 287 | ) |
| 288 | |
Brian Silverman | 2876027 | 2020-02-02 13:21:51 -0800 | [diff] [blame] | 289 | flatbuffer_py_library( |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 290 | name = "configuration_fbs_python", |
| 291 | srcs = ["configuration.fbs"], |
| 292 | namespace = "aos", |
| 293 | tables = [ |
| 294 | "Configuration", |
| 295 | "Channel", |
James Kuszmaul | 84ff3e5 | 2020-01-03 19:48:53 -0800 | [diff] [blame] | 296 | "Connection", |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 297 | "Map", |
| 298 | "Node", |
| 299 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 300 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 7daef36 | 2019-12-31 18:28:17 -0800 | [diff] [blame] | 301 | visibility = ["//visibility:public"], |
| 302 | ) |
| 303 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 304 | flatbuffer_rust_library( |
| 305 | name = "configuration_rust_fbs", |
| 306 | srcs = ["configuration.fbs"], |
| 307 | crate_name = "aos_configuration_fbs", |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 308 | target_compatible_with = select({ |
| 309 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 310 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 311 | }), |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 312 | visibility = ["//visibility:public"], |
| 313 | ) |
| 314 | |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 315 | cc_library( |
| 316 | name = "configuration", |
| 317 | srcs = [ |
| 318 | "configuration.cc", |
| 319 | ], |
| 320 | hdrs = [ |
| 321 | "configuration.h", |
| 322 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 323 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 972e47e | 2018-12-20 17:20:58 -0800 | [diff] [blame] | 324 | visibility = ["//visibility:public"], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 325 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 326 | ":configuration_fbs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 327 | ":flatbuffer_merge", |
| 328 | ":flatbuffers", |
| 329 | ":json_to_flatbuffer", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 330 | "//aos:unique_malloc_ptr", |
Austin Schuh | 83cbb1e | 2023-06-23 12:59:02 -0700 | [diff] [blame] | 331 | "//aos/ipc_lib:index", |
Austin Schuh | 217a978 | 2019-12-21 23:02:50 -0800 | [diff] [blame] | 332 | "//aos/network:team_number", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 333 | "//aos/util:file", |
| 334 | "@com_github_google_glog//:glog", |
| 335 | "@com_google_absl//absl/container:btree", |
| 336 | "@com_google_absl//absl/strings", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 337 | ], |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 338 | ) |
| 339 | |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 340 | cc_library( |
| 341 | name = "configuration_for_rust", |
| 342 | srcs = [ |
| 343 | "configuration_for_rust.cc", |
| 344 | ], |
| 345 | hdrs = [ |
| 346 | "configuration_for_rust.h", |
| 347 | ], |
| 348 | deps = [ |
| 349 | ":configuration", |
| 350 | ":for_rust", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 351 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 352 | ], |
| 353 | ) |
| 354 | |
| 355 | autocxx_library( |
| 356 | name = "configuration_rs", |
| 357 | srcs = ["configuration.rs"], |
| 358 | crate_name = "aos_configuration", |
| 359 | libs = [ |
| 360 | ":configuration", |
| 361 | ":configuration_for_rust", |
| 362 | ":configuration_fbs", |
| 363 | ], |
| 364 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 365 | target_compatible_with = select({ |
| 366 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 367 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 368 | }), |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 369 | visibility = ["//visibility:public"], |
| 370 | deps = [ |
| 371 | ":configuration_rust_fbs", |
| 372 | ":flatbuffers_rs", |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 373 | "@crate_index//:thiserror", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 374 | ], |
| 375 | ) |
| 376 | |
| 377 | rust_test( |
| 378 | name = "configuration_rs_test", |
| 379 | crate = ":configuration_rs", |
| 380 | data = [ |
| 381 | "//aos/testdata:test_configs", |
| 382 | ], |
| 383 | # TODO: Make Rust play happy with pic vs nopic. Details at: |
| 384 | # https://github.com/bazelbuild/rules_rust/issues/118 |
| 385 | rustc_flags = ["-Crelocation-model=static"], |
| 386 | ) |
| 387 | |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 388 | flatbuffer_ts_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 389 | name = "json_to_flatbuffer_fbs_ts", |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 390 | srcs = ["json_to_flatbuffer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 391 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 392 | visibility = ["//aos:__subpackages__"], |
| 393 | ) |
| 394 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 395 | flatbuffer_cc_library( |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 396 | name = "json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 397 | srcs = ["json_to_flatbuffer.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 398 | gen_reflections = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 399 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | abb7713 | 2020-08-01 19:56:16 -0700 | [diff] [blame] | 400 | visibility = ["//aos:__subpackages__"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 401 | ) |
| 402 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 403 | flatbuffer_rust_library( |
| 404 | name = "json_to_flatbuffer_rust_fbs", |
| 405 | srcs = ["json_to_flatbuffer.fbs"], |
| 406 | crate_name = "aos_json_to_flatbuffer_fbs", |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 407 | target_compatible_with = select({ |
| 408 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 409 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 410 | }), |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 411 | visibility = ["//aos:__subpackages__"], |
| 412 | ) |
| 413 | |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 414 | cc_library( |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 415 | name = "flatbuffer_utils", |
| 416 | srcs = ["flatbuffer_utils.cc"], |
| 417 | hdrs = ["flatbuffer_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 418 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 419 | visibility = ["//visibility:public"], |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 420 | deps = [ |
| 421 | "@com_github_google_flatbuffers//:flatbuffers", |
Brian Silverman | cf4fb66 | 2021-02-10 17:54:53 -0800 | [diff] [blame] | 422 | "@com_github_google_glog//:glog", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 423 | ], |
| 424 | ) |
| 425 | |
| 426 | cc_library( |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 427 | name = "json_tokenizer", |
| 428 | srcs = ["json_tokenizer.cc"], |
| 429 | hdrs = ["json_tokenizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 430 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 431 | deps = [ |
Pallavi Madhukar | e2eb281 | 2022-07-19 09:56:09 -0700 | [diff] [blame] | 432 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 433 | "@com_github_google_glog//:glog", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 434 | "@com_google_absl//absl/strings", |
| 435 | ], |
| 436 | ) |
| 437 | |
| 438 | cc_library( |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 439 | name = "json_to_flatbuffer", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 440 | srcs = [ |
| 441 | "flatbuffer_introspection.cc", |
| 442 | "json_to_flatbuffer.cc", |
| 443 | ], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 444 | hdrs = ["json_to_flatbuffer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 445 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 446 | visibility = ["//visibility:public"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 447 | deps = [ |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 448 | ":fast_string_builder", |
Austin Schuh | 43c6a35 | 2019-09-30 22:22:10 -0700 | [diff] [blame] | 449 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 450 | ":flatbuffers", |
Austin Schuh | d7e252d | 2019-10-06 13:51:02 -0700 | [diff] [blame] | 451 | ":json_tokenizer", |
James Kuszmaul | f5eb468 | 2023-09-22 17:16:59 -0700 | [diff] [blame] | 452 | "//aos/flatbuffers:builder", |
Austin Schuh | bba1028 | 2021-03-20 22:03:28 -0700 | [diff] [blame] | 453 | "//aos/util:file", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 454 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 455 | "@com_github_google_glog//:glog", |
Austin Schuh | d339a9b | 2019-10-05 21:33:32 -0700 | [diff] [blame] | 456 | "@com_google_absl//absl/strings", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 457 | ], |
| 458 | ) |
| 459 | |
| 460 | cc_test( |
| 461 | name = "json_to_flatbuffer_test", |
| 462 | srcs = [ |
| 463 | "json_to_flatbuffer_test.cc", |
| 464 | ], |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 465 | data = [ |
| 466 | ":json_to_flatbuffer_fbs_reflection_out", |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 467 | ":json_to_flatbuffer_test_spaces.json", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 468 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 469 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 470 | deps = [ |
Alexander Yee | e61cac3 | 2023-02-11 19:40:40 -0800 | [diff] [blame] | 471 | ":flatbuffer_merge", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 472 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 473 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 474 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 475 | "//aos/testing:path", |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 476 | ], |
| 477 | ) |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 478 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 479 | cc_test( |
| 480 | name = "flatbuffer_introspection_test", |
| 481 | srcs = [ |
| 482 | "flatbuffer_introspection_test.cc", |
| 483 | ], |
| 484 | data = [ |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 485 | ":json_to_flatbuffer_fbs_reflection_out", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 486 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 487 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 488 | deps = [ |
| 489 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 490 | ":json_to_flatbuffer_fbs", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 491 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 492 | "//aos/testing:path", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 493 | "//aos/util:file", |
| 494 | "@com_github_google_flatbuffers//:flatbuffers", |
| 495 | ], |
| 496 | ) |
| 497 | |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 498 | cc_library( |
| 499 | name = "flatbuffer_merge", |
| 500 | srcs = ["flatbuffer_merge.cc"], |
| 501 | hdrs = ["flatbuffer_merge.h"], |
| 502 | copts = ["-Wno-cast-align"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 503 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 504 | visibility = ["//visibility:public"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 505 | deps = [ |
| 506 | ":flatbuffer_utils", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 507 | ":flatbuffers", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 508 | "@com_github_google_flatbuffers//:flatbuffers", |
| 509 | ], |
| 510 | ) |
| 511 | |
| 512 | cc_test( |
| 513 | name = "flatbuffer_merge_test", |
| 514 | srcs = [ |
| 515 | "flatbuffer_merge_test.cc", |
| 516 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 517 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 518 | deps = [ |
| 519 | ":flatbuffer_merge", |
| 520 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 521 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 522 | "//aos/testing:googletest", |
| 523 | ], |
| 524 | ) |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 525 | |
| 526 | cc_library( |
| 527 | name = "flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 528 | srcs = [ |
| 529 | "flatbuffers.cc", |
| 530 | ], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 531 | hdrs = [ |
| 532 | "flatbuffers.h", |
| 533 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 534 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 535 | visibility = ["//visibility:public"], |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 536 | deps = [ |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 537 | "//aos:macros", |
Brian Silverman | 354697a | 2020-09-22 21:06:32 -0700 | [diff] [blame] | 538 | "//aos/containers:resizeable_buffer", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 539 | "//aos/util:file", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 540 | "@com_github_google_flatbuffers//:flatbuffers", |
Austin Schuh | 40485ed | 2019-10-26 21:51:44 -0700 | [diff] [blame] | 541 | "@com_github_google_glog//:glog", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 542 | "@com_google_absl//absl/strings", |
Austin Schuh | 6f3babe | 2020-01-26 20:34:50 -0800 | [diff] [blame] | 543 | "@com_google_absl//absl/types:span", |
Austin Schuh | e93d864 | 2019-10-13 15:27:07 -0700 | [diff] [blame] | 544 | ], |
| 545 | ) |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 546 | |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 547 | rust_library( |
| 548 | name = "flatbuffers_rs", |
| 549 | srcs = ["flatbuffers.rs"], |
| 550 | crate_name = "aos_flatbuffers", |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 551 | target_compatible_with = select({ |
| 552 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 553 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 554 | }), |
Brian Silverman | d1805b6 | 2022-07-20 20:47:05 -0700 | [diff] [blame] | 555 | visibility = ["//visibility:public"], |
| 556 | deps = [ |
| 557 | "@com_github_google_flatbuffers//rust", |
| 558 | ], |
| 559 | ) |
| 560 | |
| 561 | rust_test( |
| 562 | name = "flatbuffers_rs_test", |
| 563 | crate = ":flatbuffers_rs", |
| 564 | deps = [ |
| 565 | ":json_to_flatbuffer_rust_fbs", |
| 566 | ], |
| 567 | ) |
| 568 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 569 | cc_test( |
| 570 | name = "configuration_test", |
| 571 | srcs = [ |
| 572 | "configuration_test.cc", |
| 573 | ], |
| 574 | data = [ |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 575 | "//aos/events:ping_fbs_reflection_out", |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 576 | "//aos/events:pingpong_config", |
Brian Silverman | dae15a1 | 2022-07-23 12:55:20 -0700 | [diff] [blame] | 577 | "//aos/events:pong_fbs_reflection_out", |
James Kuszmaul | c0c08da | 2020-05-10 18:56:07 -0700 | [diff] [blame] | 578 | "//aos/testdata:test_configs", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 579 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 580 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 581 | deps = [ |
| 582 | ":configuration", |
Nathan Leong | 307c969 | 2022-10-08 15:25:03 -0700 | [diff] [blame] | 583 | "//aos/events:ping_fbs", |
Austin Schuh | 1ef01ef | 2021-02-07 20:40:36 -0800 | [diff] [blame] | 584 | "//aos/testing:flatbuffer_eq", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 585 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 586 | "//aos/testing:path", |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 587 | "//aos/testing:test_logging", |
| 588 | ], |
| 589 | ) |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 590 | |
| 591 | cc_binary( |
| 592 | name = "config_flattener", |
| 593 | srcs = [ |
| 594 | "config_flattener.cc", |
| 595 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 596 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 597 | visibility = ["//visibility:public"], |
| 598 | deps = [ |
| 599 | ":configuration", |
| 600 | ":init", |
| 601 | "//aos/util:file", |
| 602 | "@com_github_google_glog//:glog", |
| 603 | ], |
| 604 | ) |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 605 | |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 606 | cc_library( |
| 607 | name = "aos_cli_utils", |
| 608 | srcs = [ |
| 609 | "aos_cli_utils.cc", |
| 610 | ], |
| 611 | hdrs = [ |
| 612 | "aos_cli_utils.h", |
| 613 | ], |
| 614 | target_compatible_with = ["@platforms//os:linux"], |
| 615 | visibility = ["//visibility:public"], |
| 616 | deps = [ |
| 617 | ":configuration", |
| 618 | "//aos:init", |
| 619 | "//aos/events:shm_event_loop", |
Austin Schuh | 893d7f4 | 2022-09-16 15:01:35 -0700 | [diff] [blame] | 620 | "//aos/events:simulated_event_loop", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 621 | "@com_github_google_glog//:glog", |
| 622 | ], |
| 623 | ) |
| 624 | |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 625 | cc_binary( |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 626 | name = "aos_dump", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 627 | srcs = [ |
Austin Schuh | 944df34 | 2019-12-21 17:08:55 -0800 | [diff] [blame] | 628 | "aos_dump.cc", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 629 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 630 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 631 | visibility = ["//visibility:public"], |
| 632 | deps = [ |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 633 | ":aos_cli_utils", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 634 | ":configuration", |
| 635 | ":json_to_flatbuffer", |
| 636 | "//aos:init", |
Brian Silverman | ea2c95f | 2021-02-10 18:10:26 -0800 | [diff] [blame] | 637 | "@com_github_google_glog//:glog", |
| 638 | ], |
| 639 | ) |
| 640 | |
| 641 | cc_binary( |
| 642 | name = "aos_send", |
| 643 | srcs = [ |
| 644 | "aos_send.cc", |
| 645 | ], |
| 646 | target_compatible_with = ["@platforms//os:linux"], |
| 647 | visibility = ["//visibility:public"], |
| 648 | deps = [ |
| 649 | ":aos_cli_utils", |
| 650 | ":configuration", |
| 651 | ":init", |
| 652 | ":json_to_flatbuffer", |
| 653 | "@com_github_gflags_gflags//:gflags", |
Tyler Chatow | 5e369a4 | 2019-11-23 11:57:31 -0800 | [diff] [blame] | 654 | "@com_github_google_glog//:glog", |
| 655 | ], |
| 656 | ) |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 657 | |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 658 | cc_binary( |
| 659 | name = "aos_graph_nodes", |
| 660 | srcs = [ |
| 661 | "aos_graph_nodes.cc", |
| 662 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 663 | target_compatible_with = ["@platforms//os:linux"], |
Jim Ostrowski | 17ce54d | 2020-10-24 17:24:01 -0700 | [diff] [blame] | 664 | visibility = ["//visibility:public"], |
| 665 | deps = [ |
| 666 | ":configuration", |
| 667 | ":json_to_flatbuffer", |
| 668 | "//aos:init", |
| 669 | "//aos/events:shm_event_loop", |
| 670 | "@com_github_google_glog//:glog", |
| 671 | ], |
| 672 | ) |
| 673 | |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 674 | cc_library( |
| 675 | name = "ftrace", |
| 676 | srcs = [ |
| 677 | "ftrace.cc", |
| 678 | ], |
| 679 | hdrs = [ |
| 680 | "ftrace.h", |
| 681 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 682 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 683 | visibility = ["//visibility:public"], |
| 684 | deps = [ |
| 685 | "@com_github_google_glog//:glog", |
Austin Schuh | c9de013 | 2022-12-26 18:04:53 -0800 | [diff] [blame] | 686 | "@com_google_absl//absl/strings", |
Brian Silverman | 79ec7fc | 2020-06-08 20:11:22 -0500 | [diff] [blame] | 687 | ], |
| 688 | ) |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 689 | |
| 690 | cc_library( |
| 691 | name = "fast_string_builder", |
| 692 | srcs = [ |
| 693 | "fast_string_builder.cc", |
| 694 | ], |
| 695 | hdrs = [ |
| 696 | "fast_string_builder.h", |
| 697 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 698 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 4ed5fb1 | 2022-03-22 15:20:04 -0700 | [diff] [blame] | 699 | visibility = ["//visibility:public"], |
Tyler Chatow | fcf16f4 | 2020-07-26 12:41:36 -0700 | [diff] [blame] | 700 | deps = [ |
| 701 | "@com_github_google_glog//:glog", |
| 702 | "@com_google_absl//absl/strings", |
| 703 | "@com_google_absl//absl/strings:str_format", |
| 704 | ], |
| 705 | ) |
Brian Silverman | b47f555 | 2020-10-01 15:08:14 -0700 | [diff] [blame] | 706 | |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 707 | cc_test( |
| 708 | name = "realtime_test", |
| 709 | srcs = [ |
| 710 | "realtime_test.cc", |
| 711 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 712 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 713 | visibility = ["//visibility:public"], |
| 714 | deps = [ |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 715 | ":init", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 716 | ":realtime", |
Austin Schuh | 77f3f22 | 2022-06-10 16:49:21 -0700 | [diff] [blame] | 717 | "@com_github_gflags_gflags//:gflags", |
| 718 | "@com_github_google_glog//:glog", |
| 719 | "@com_google_googletest//:gtest", |
Austin Schuh | cc6070c | 2020-10-10 20:25:56 -0700 | [diff] [blame] | 720 | ], |
| 721 | ) |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 722 | |
| 723 | cc_test( |
| 724 | name = "flatbuffers_test", |
| 725 | srcs = [ |
| 726 | "flatbuffers_test.cc", |
| 727 | ], |
| 728 | deps = [ |
| 729 | ":flatbuffers", |
| 730 | ":json_to_flatbuffer", |
Brian Silverman | c5105ab | 2021-02-10 17:55:38 -0800 | [diff] [blame] | 731 | ":json_to_flatbuffer_fbs", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 732 | "//aos/testing:googletest", |
davidjevans | 8b9b52f | 2021-09-17 08:57:30 -0700 | [diff] [blame] | 733 | "//aos/testing:tmpdir", |
Austin Schuh | 977a5ed | 2020-12-02 23:20:04 -0800 | [diff] [blame] | 734 | ], |
| 735 | ) |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 736 | |
| 737 | py_binary( |
| 738 | name = "flatbuffers_static", |
| 739 | srcs = ["flatbuffers_static.py"], |
| 740 | visibility = ["//visibility:public"], |
| 741 | ) |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 742 | |
| 743 | cc_library( |
| 744 | name = "uuid", |
| 745 | srcs = ["uuid.cc"], |
| 746 | hdrs = ["uuid.h"], |
| 747 | target_compatible_with = ["@platforms//os:linux"], |
| 748 | visibility = ["//visibility:public"], |
| 749 | deps = [ |
Austin Schuh | 8902fa5 | 2021-03-14 22:39:24 -0700 | [diff] [blame] | 750 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 751 | "@com_github_google_flatbuffers//:flatbuffers", |
| 752 | "@com_github_google_glog//:glog", |
| 753 | "@com_google_absl//absl/types:span", |
| 754 | ], |
| 755 | ) |
| 756 | |
| 757 | cc_test( |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 758 | name = "uuid_collision_test", |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 759 | timeout = "eternal", |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 760 | srcs = ["uuid_collision_test.cc"], |
James Kuszmaul | a791b76 | 2023-07-13 14:56:21 -0700 | [diff] [blame] | 761 | shard_count = 2, |
James Kuszmaul | 05ccb27 | 2023-07-13 10:58:14 -0700 | [diff] [blame] | 762 | target_compatible_with = ["@platforms//os:linux"], |
| 763 | deps = [ |
| 764 | ":uuid", |
| 765 | "//aos/testing:googletest", |
| 766 | ], |
| 767 | ) |
| 768 | |
| 769 | cc_test( |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 770 | name = "uuid_test", |
| 771 | srcs = ["uuid_test.cc"], |
| 772 | target_compatible_with = ["@platforms//os:linux"], |
| 773 | deps = [ |
| 774 | ":uuid", |
| 775 | "//aos/testing:googletest", |
| 776 | ], |
| 777 | ) |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 778 | |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 779 | cc_library( |
| 780 | name = "uuid_for_rust", |
| 781 | hdrs = ["uuid_for_rust.h"], |
| 782 | deps = [ |
| 783 | ":uuid", |
| 784 | ], |
| 785 | ) |
| 786 | |
| 787 | autocxx_library( |
| 788 | name = "uuid_rs", |
| 789 | srcs = ["uuid.rs"], |
| 790 | crate_name = "aos_uuid", |
| 791 | libs = [ |
| 792 | ":uuid", |
| 793 | ":uuid_for_rust", |
| 794 | ], |
| 795 | override_cc_toolchain = "@llvm_toolchain//:cc-clang-x86_64-linux", |
| 796 | rs_deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 797 | "@crate_index//:uuid", |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 798 | ], |
Austin Schuh | dfa127f | 2022-10-26 21:17:42 -0700 | [diff] [blame] | 799 | target_compatible_with = select({ |
| 800 | "//conditions:default": ["//tools/platforms/rust:has_support"], |
| 801 | "//tools:has_msan": ["@platforms//:incompatible"], |
| 802 | }), |
Brian Silverman | 1059993 | 2022-08-15 06:05:53 -0700 | [diff] [blame] | 803 | visibility = ["//visibility:public"], |
| 804 | ) |
| 805 | |
Austin Schuh | 30f7429 | 2021-08-13 17:25:26 -0700 | [diff] [blame] | 806 | cc_binary( |
| 807 | name = "aos_graph_channels", |
| 808 | srcs = [ |
| 809 | "aos_graph_channels.cc", |
| 810 | ], |
| 811 | target_compatible_with = ["@platforms//os:linux"], |
| 812 | deps = [ |
| 813 | "//aos:configuration", |
| 814 | "//aos:init", |
| 815 | "//aos:json_to_flatbuffer", |
| 816 | "//aos/events:simulated_event_loop", |
| 817 | "//aos/events/logging:log_reader", |
| 818 | "//aos/time", |
| 819 | "@com_github_gflags_gflags//:gflags", |
| 820 | "@com_github_google_glog//:glog", |
| 821 | ], |
| 822 | ) |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 823 | |
| 824 | cc_library( |
| 825 | name = "for_rust", |
| 826 | hdrs = [ |
| 827 | "for_rust.h", |
| 828 | ], |
| 829 | visibility = ["//visibility:public"], |
| 830 | deps = [ |
Adam Snaider | 770b97b | 2023-08-04 21:07:48 -0700 | [diff] [blame] | 831 | "@crate_index//:cxx_cc", |
Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame] | 832 | ], |
| 833 | ) |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 834 | |
| 835 | cc_library( |
| 836 | name = "sha256", |
| 837 | srcs = [ |
| 838 | "sha256.cc", |
| 839 | ], |
| 840 | hdrs = ["sha256.h"], |
| 841 | target_compatible_with = ["@platforms//os:linux"], |
| 842 | visibility = ["//visibility:public"], |
| 843 | deps = [ |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 844 | "//aos/util:file", |
Austin Schuh | b0e439d | 2023-05-15 10:55:40 -0700 | [diff] [blame] | 845 | "@boringssl//:crypto", |
| 846 | "@com_google_absl//absl/types:span", |
| 847 | ], |
| 848 | ) |
James Kuszmaul | 56802ab | 2023-08-23 15:18:34 -0700 | [diff] [blame] | 849 | |
| 850 | cc_test( |
| 851 | name = "sha256_test", |
| 852 | srcs = ["sha256_test.cc"], |
| 853 | deps = [ |
| 854 | ":sha256", |
| 855 | "//aos/testing:googletest", |
| 856 | "//aos/testing:tmpdir", |
| 857 | ], |
| 858 | ) |