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