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