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