blob: 9394295013dac593db86e3e2dabb52fde1bbd3d5 [file] [log] [blame]
Brian Silvermand1805b62022-07-20 20:47:05 -07001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_rust_library", "flatbuffer_ts_library")
2load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
Austin Schuh972e47e2018-12-20 17:20:58 -08003
Austin Schuh00e302a2020-12-21 11:53:30 -08004exports_files(["aos_dump_autocomplete.sh"])
5
Brian Silverman258b9172015-09-19 14:32:57 -04006filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -07007 name = "prime_binaries",
8 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -08009 "//aos:aos_dump",
Tyler Chatowe6f5bef2020-10-31 14:22:04 -070010 "//aos:aos_dump_autocomplete.sh",
Brian Silvermanea2c95f2021-02-10 18:10:26 -080011 "//aos:aos_send",
Austin Schuh91d8d062020-11-02 17:11:13 -080012 "//aos/starter",
Brian Silverman6470f442018-08-05 12:08:16 -070013 ],
14 visibility = ["//visibility:public"],
Austin Schuh1eceeb92015-11-08 21:16:06 -080015)
Austin Schuhc80dd152016-02-29 01:47:44 -080016
17filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070018 name = "prime_start_binaries",
19 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080020 "//aos/events/logging:logger_main",
Brian Silverman6470f442018-08-05 12:08:16 -070021 ],
22 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080023)
Brian Silverman6470f442018-08-05 12:08:16 -070024
Austin Schuhc80dd152016-02-29 01:47:44 -080025filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070026 name = "prime_binaries_stripped",
27 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -080028 "//aos:aos_dump.stripped",
Tyler Chatowe6f5bef2020-10-31 14:22:04 -070029 "//aos:aos_dump_autocomplete.sh",
Brian Silvermanea2c95f2021-02-10 18:10:26 -080030 "//aos:aos_send.stripped",
Austin Schuh44e0b142021-10-16 15:51:10 -070031 "//aos/starter:starter_stripped",
Brian Silverman6470f442018-08-05 12:08:16 -070032 ],
33 visibility = ["//visibility:public"],
34)
35
36filegroup(
37 name = "prime_start_binaries_stripped",
38 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080039 "//aos/events/logging:logger_main.stripped",
Brian Silverman6470f442018-08-05 12:08:16 -070040 ],
41 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080042)
Sabina Davis2ed5ea22017-09-26 22:27:42 -070043
44cc_library(
John Park33858a32018-09-28 23:05:48 -070045 name = "math",
46 hdrs = [
47 "commonmath.h",
48 ],
John Park33858a32018-09-28 23:05:48 -070049 visibility = ["//visibility:public"],
50)
51
Brian Silverman6470f442018-08-05 12:08:16 -070052py_library(
53 name = "python_init",
54 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -080055 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070056 visibility = ["//visibility:public"],
Sabina Davis2ed5ea22017-09-26 22:27:42 -070057)
John Park33858a32018-09-28 23:05:48 -070058
59cc_library(
Austin Schuh972e47e2018-12-20 17:20:58 -080060 name = "macros",
61 hdrs = [
John Park33858a32018-09-28 23:05:48 -070062 "macros.h",
John Park33858a32018-09-28 23:05:48 -070063 ],
64 visibility = ["//visibility:public"],
65)
66
67cc_library(
68 name = "gtest_prod",
69 hdrs = [
70 "gtest_prod.h",
71 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080072 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070073 visibility = ["//visibility:public"],
74)
75
76cc_library(
John Park33858a32018-09-28 23:05:48 -070077 name = "unique_malloc_ptr",
78 hdrs = [
79 "unique_malloc_ptr.h",
80 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080081 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070082 visibility = ["//visibility:public"],
83)
84
85cc_library(
86 name = "condition",
87 srcs = [
88 "condition.cc",
89 ],
90 hdrs = [
91 "condition.h",
92 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080093 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070094 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -080095 deps = [
96 "//aos/ipc_lib:aos_sync",
Austin Schuh972e47e2018-12-20 17:20:58 -080097 "//aos/mutex",
Alex Perrycb7da4b2019-08-28 19:35:56 -070098 "@com_github_google_glog//:glog",
Austin Schuh972e47e2018-12-20 17:20:58 -080099 ],
John Park33858a32018-09-28 23:05:48 -0700100)
101
102cc_test(
103 name = "condition_test",
104 srcs = [
105 "condition_test.cc",
106 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800107 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700108 deps = [
109 ":condition",
110 "//aos:die",
John Park398c74a2018-10-20 21:17:39 -0700111 "//aos/ipc_lib:aos_sync",
112 "//aos/ipc_lib:core_lib",
Austin Schuh972e47e2018-12-20 17:20:58 -0800113 "//aos/logging",
114 "//aos/mutex",
John Park33858a32018-09-28 23:05:48 -0700115 "//aos/testing:googletest",
116 "//aos/testing:prevent_exit",
117 "//aos/testing:test_shm",
Austin Schuh972e47e2018-12-20 17:20:58 -0800118 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700119 ],
120)
121
122cc_library(
123 name = "die",
124 srcs = [
125 "die.cc",
126 ],
127 hdrs = [
128 "die.h",
129 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800130 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800131 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -0700132 deps = [
133 "//aos:macros",
134 "//aos/libc:aos_strerror",
135 ],
John Park33858a32018-09-28 23:05:48 -0700136)
137
John Park33858a32018-09-28 23:05:48 -0700138cc_test(
139 name = "die_test",
140 srcs = [
141 "die_test.cc",
142 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800143 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700144 deps = [
145 ":die",
146 "//aos/testing:googletest",
147 ],
148)
149
John Park398c74a2018-10-20 21:17:39 -0700150cc_binary(
151 name = "dump_rtprio",
152 srcs = [
153 "dump_rtprio.cc",
154 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800155 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700156 deps = [
Austin Schuh972e47e2018-12-20 17:20:58 -0800157 "//aos/time",
Brian Silverman3eb60d22021-11-04 19:06:47 -0700158 "@com_github_google_glog//:glog",
John Park398c74a2018-10-20 21:17:39 -0700159 ],
160)
161
162cc_library(
John Park398c74a2018-10-20 21:17:39 -0700163 name = "init",
164 srcs = [
165 "init.cc",
166 ],
167 hdrs = [
168 "init.h",
169 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800170 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800171 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700172 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700173 ":realtime",
John Park398c74a2018-10-20 21:17:39 -0700174 "//aos:die",
Austin Schuh972e47e2018-12-20 17:20:58 -0800175 "//aos/logging:implementations",
John Park398c74a2018-10-20 21:17:39 -0700176 ],
John Park398c74a2018-10-20 21:17:39 -0700177)
178
Alex Perrycb7da4b2019-08-28 19:35:56 -0700179cc_library(
180 name = "realtime",
181 srcs = [
182 "realtime.cc",
183 ],
184 hdrs = [
185 "realtime.h",
186 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800187 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700188 visibility = ["//visibility:public"],
189 deps = [
Austin Schuhcc6070c2020-10-10 20:25:56 -0700190 ":thread_local",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700191 "@com_github_google_glog//:glog",
192 ],
193)
194
Austin Schuhcb108412019-10-13 16:09:54 -0700195flatbuffer_cc_library(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700196 name = "configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700197 srcs = ["configuration.fbs"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700198 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800199 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700200 visibility = ["//visibility:public"],
Austin Schuhcb108412019-10-13 16:09:54 -0700201)
202
Alex Perryd5e13572020-02-22 15:15:08 -0800203flatbuffer_ts_library(
204 name = "configuration_ts_fbs",
205 srcs = ["configuration.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800206 target_compatible_with = ["@platforms//os:linux"],
Alex Perryd5e13572020-02-22 15:15:08 -0800207 visibility = ["//visibility:public"],
208)
209
Brian Silverman28760272020-02-02 13:21:51 -0800210flatbuffer_py_library(
James Kuszmaul7daef362019-12-31 18:28:17 -0800211 name = "configuration_fbs_python",
212 srcs = ["configuration.fbs"],
213 namespace = "aos",
214 tables = [
215 "Configuration",
216 "Channel",
James Kuszmaul84ff3e52020-01-03 19:48:53 -0800217 "Connection",
James Kuszmaul7daef362019-12-31 18:28:17 -0800218 "Map",
219 "Node",
220 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800221 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul7daef362019-12-31 18:28:17 -0800222 visibility = ["//visibility:public"],
223)
224
John Park398c74a2018-10-20 21:17:39 -0700225cc_library(
226 name = "configuration",
227 srcs = [
228 "configuration.cc",
229 ],
230 hdrs = [
231 "configuration.h",
232 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800233 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800234 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700235 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700236 ":configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700237 ":flatbuffer_merge",
238 ":flatbuffers",
239 ":json_to_flatbuffer",
John Park398c74a2018-10-20 21:17:39 -0700240 "//aos:unique_malloc_ptr",
Austin Schuh217a9782019-12-21 23:02:50 -0800241 "//aos/network:team_number",
Austin Schuhcb108412019-10-13 16:09:54 -0700242 "//aos/util:file",
243 "@com_github_google_glog//:glog",
244 "@com_google_absl//absl/container:btree",
245 "@com_google_absl//absl/strings",
John Park398c74a2018-10-20 21:17:39 -0700246 ],
John Park398c74a2018-10-20 21:17:39 -0700247)
248
James Kuszmaulabb77132020-08-01 19:56:16 -0700249flatbuffer_ts_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800250 name = "json_to_flatbuffer_fbs_ts",
James Kuszmaulabb77132020-08-01 19:56:16 -0700251 srcs = ["json_to_flatbuffer.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800252 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700253 visibility = ["//aos:__subpackages__"],
254)
255
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700256flatbuffer_cc_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800257 name = "json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700258 srcs = ["json_to_flatbuffer.fbs"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800259 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800260 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700261 visibility = ["//aos:__subpackages__"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700262)
263
Brian Silvermand1805b62022-07-20 20:47:05 -0700264flatbuffer_rust_library(
265 name = "json_to_flatbuffer_rust_fbs",
266 srcs = ["json_to_flatbuffer.fbs"],
267 crate_name = "aos_json_to_flatbuffer_fbs",
268 target_compatible_with = ["//tools/platforms/rust:has_support"],
269 visibility = ["//aos:__subpackages__"],
270)
271
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700272cc_library(
Austin Schuh43c6a352019-09-30 22:22:10 -0700273 name = "flatbuffer_utils",
274 srcs = ["flatbuffer_utils.cc"],
275 hdrs = ["flatbuffer_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800276 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul4ed5fb12022-03-22 15:20:04 -0700277 visibility = ["//visibility:public"],
Austin Schuh43c6a352019-09-30 22:22:10 -0700278 deps = [
279 "@com_github_google_flatbuffers//:flatbuffers",
Brian Silvermancf4fb662021-02-10 17:54:53 -0800280 "@com_github_google_glog//:glog",
Austin Schuh43c6a352019-09-30 22:22:10 -0700281 ],
282)
283
284cc_library(
Austin Schuhd7e252d2019-10-06 13:51:02 -0700285 name = "json_tokenizer",
286 srcs = ["json_tokenizer.cc"],
287 hdrs = ["json_tokenizer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800288 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhd7e252d2019-10-06 13:51:02 -0700289 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700290 "@com_github_google_glog//:glog",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700291 "@com_google_absl//absl/strings",
292 ],
293)
294
295cc_library(
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700296 name = "json_to_flatbuffer",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800297 srcs = [
298 "flatbuffer_introspection.cc",
299 "json_to_flatbuffer.cc",
300 ],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700301 hdrs = ["json_to_flatbuffer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800302 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700303 visibility = ["//visibility:public"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700304 deps = [
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700305 ":fast_string_builder",
Austin Schuh43c6a352019-09-30 22:22:10 -0700306 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700307 ":flatbuffers",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700308 ":json_tokenizer",
Austin Schuhbba10282021-03-20 22:03:28 -0700309 "//aos/util:file",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700310 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuhe93d8642019-10-13 15:27:07 -0700311 "@com_github_google_glog//:glog",
Austin Schuhd339a9b2019-10-05 21:33:32 -0700312 "@com_google_absl//absl/strings",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700313 ],
314)
315
316cc_test(
317 name = "json_to_flatbuffer_test",
318 srcs = [
319 "json_to_flatbuffer_test.cc",
320 ],
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800321 data = [
322 ":json_to_flatbuffer_fbs_reflection_out",
323 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800324 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700325 deps = [
326 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800327 ":json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700328 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700329 "//aos/testing:path",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700330 ],
331)
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700332
Tyler Chatow5e369a42019-11-23 11:57:31 -0800333cc_test(
334 name = "flatbuffer_introspection_test",
335 srcs = [
336 "flatbuffer_introspection_test.cc",
337 ],
338 data = [
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800339 ":json_to_flatbuffer_fbs_reflection_out",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800340 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800341 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800342 deps = [
343 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800344 ":json_to_flatbuffer_fbs",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800345 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700346 "//aos/testing:path",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800347 "//aos/util:file",
348 "@com_github_google_flatbuffers//:flatbuffers",
349 ],
350)
351
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700352cc_library(
353 name = "flatbuffer_merge",
354 srcs = ["flatbuffer_merge.cc"],
355 hdrs = ["flatbuffer_merge.h"],
356 copts = ["-Wno-cast-align"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800357 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700358 visibility = ["//visibility:public"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700359 deps = [
360 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700361 ":flatbuffers",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700362 "@com_github_google_flatbuffers//:flatbuffers",
363 ],
364)
365
366cc_test(
367 name = "flatbuffer_merge_test",
368 srcs = [
369 "flatbuffer_merge_test.cc",
370 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800371 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700372 deps = [
373 ":flatbuffer_merge",
374 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800375 ":json_to_flatbuffer_fbs",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700376 "//aos/testing:googletest",
377 ],
378)
Austin Schuhe93d8642019-10-13 15:27:07 -0700379
380cc_library(
381 name = "flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700382 srcs = [
383 "flatbuffers.cc",
384 ],
Austin Schuhe93d8642019-10-13 15:27:07 -0700385 hdrs = [
386 "flatbuffers.h",
387 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800388 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh40485ed2019-10-26 21:51:44 -0700389 visibility = ["//visibility:public"],
Austin Schuhe93d8642019-10-13 15:27:07 -0700390 deps = [
James Kuszmaulad8a8082020-02-14 21:21:58 -0800391 "//aos:macros",
Brian Silverman354697a2020-09-22 21:06:32 -0700392 "//aos/containers:resizeable_buffer",
davidjevans8b9b52f2021-09-17 08:57:30 -0700393 "//aos/util:file",
Austin Schuhe93d8642019-10-13 15:27:07 -0700394 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700395 "@com_github_google_glog//:glog",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700396 "@com_google_absl//absl/strings",
Austin Schuh6f3babe2020-01-26 20:34:50 -0800397 "@com_google_absl//absl/types:span",
Austin Schuhe93d8642019-10-13 15:27:07 -0700398 ],
399)
Austin Schuhcb108412019-10-13 16:09:54 -0700400
Brian Silvermand1805b62022-07-20 20:47:05 -0700401rust_library(
402 name = "flatbuffers_rs",
403 srcs = ["flatbuffers.rs"],
404 crate_name = "aos_flatbuffers",
405 target_compatible_with = ["//tools/platforms/rust:has_support"],
406 visibility = ["//visibility:public"],
407 deps = [
408 "@com_github_google_flatbuffers//rust",
409 ],
410)
411
412rust_test(
413 name = "flatbuffers_rs_test",
414 crate = ":flatbuffers_rs",
415 deps = [
416 ":json_to_flatbuffer_rust_fbs",
417 ],
418)
419
Austin Schuhcb108412019-10-13 16:09:54 -0700420cc_test(
421 name = "configuration_test",
422 srcs = [
423 "configuration_test.cc",
424 ],
425 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700426 "//aos/events:pingpong_config",
Brian Silvermandae15a12022-07-23 12:55:20 -0700427 "//aos/events:pong_fbs_reflection_out",
James Kuszmaulc0c08da2020-05-10 18:56:07 -0700428 "//aos/testdata:test_configs",
Austin Schuhcb108412019-10-13 16:09:54 -0700429 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800430 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcb108412019-10-13 16:09:54 -0700431 deps = [
432 ":configuration",
Austin Schuh1ef01ef2021-02-07 20:40:36 -0800433 "//aos/testing:flatbuffer_eq",
Austin Schuhcb108412019-10-13 16:09:54 -0700434 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700435 "//aos/testing:path",
Austin Schuhcb108412019-10-13 16:09:54 -0700436 "//aos/testing:test_logging",
437 ],
438)
Alex Perrycb7da4b2019-08-28 19:35:56 -0700439
440cc_binary(
441 name = "config_flattener",
442 srcs = [
443 "config_flattener.cc",
444 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800445 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700446 visibility = ["//visibility:public"],
447 deps = [
448 ":configuration",
449 ":init",
450 "//aos/util:file",
451 "@com_github_google_glog//:glog",
452 ],
453)
Tyler Chatow5e369a42019-11-23 11:57:31 -0800454
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800455cc_library(
456 name = "aos_cli_utils",
457 srcs = [
458 "aos_cli_utils.cc",
459 ],
460 hdrs = [
461 "aos_cli_utils.h",
462 ],
463 target_compatible_with = ["@platforms//os:linux"],
464 visibility = ["//visibility:public"],
465 deps = [
466 ":configuration",
467 "//aos:init",
468 "//aos/events:shm_event_loop",
469 "@com_github_google_glog//:glog",
470 ],
471)
472
Tyler Chatow5e369a42019-11-23 11:57:31 -0800473cc_binary(
Austin Schuh944df342019-12-21 17:08:55 -0800474 name = "aos_dump",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800475 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -0800476 "aos_dump.cc",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800477 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800478 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800479 visibility = ["//visibility:public"],
480 deps = [
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800481 ":aos_cli_utils",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800482 ":configuration",
483 ":json_to_flatbuffer",
484 "//aos:init",
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800485 "@com_github_google_glog//:glog",
486 ],
487)
488
489cc_binary(
490 name = "aos_send",
491 srcs = [
492 "aos_send.cc",
493 ],
494 target_compatible_with = ["@platforms//os:linux"],
495 visibility = ["//visibility:public"],
496 deps = [
497 ":aos_cli_utils",
498 ":configuration",
499 ":init",
500 ":json_to_flatbuffer",
501 "@com_github_gflags_gflags//:gflags",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800502 "@com_github_google_glog//:glog",
503 ],
504)
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500505
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700506cc_binary(
507 name = "aos_graph_nodes",
508 srcs = [
509 "aos_graph_nodes.cc",
510 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800511 target_compatible_with = ["@platforms//os:linux"],
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700512 visibility = ["//visibility:public"],
513 deps = [
514 ":configuration",
515 ":json_to_flatbuffer",
516 "//aos:init",
517 "//aos/events:shm_event_loop",
518 "@com_github_google_glog//:glog",
519 ],
520)
521
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500522cc_library(
523 name = "ftrace",
524 srcs = [
525 "ftrace.cc",
526 ],
527 hdrs = [
528 "ftrace.h",
529 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800530 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500531 visibility = ["//visibility:public"],
532 deps = [
533 "@com_github_google_glog//:glog",
534 ],
535)
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700536
537cc_library(
538 name = "fast_string_builder",
539 srcs = [
540 "fast_string_builder.cc",
541 ],
542 hdrs = [
543 "fast_string_builder.h",
544 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800545 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul4ed5fb12022-03-22 15:20:04 -0700546 visibility = ["//visibility:public"],
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700547 deps = [
548 "@com_github_google_glog//:glog",
549 "@com_google_absl//absl/strings",
550 "@com_google_absl//absl/strings:str_format",
551 ],
552)
Brian Silvermanb47f5552020-10-01 15:08:14 -0700553
554cc_library(
555 name = "thread_local",
556 hdrs = [
557 "thread_local.h",
558 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800559 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb47f5552020-10-01 15:08:14 -0700560 visibility = ["//visibility:public"],
561)
Austin Schuhcc6070c2020-10-10 20:25:56 -0700562
563cc_test(
564 name = "realtime_test",
565 srcs = [
566 "realtime_test.cc",
567 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800568 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcc6070c2020-10-10 20:25:56 -0700569 visibility = ["//visibility:public"],
570 deps = [
Austin Schuh77f3f222022-06-10 16:49:21 -0700571 ":init",
Austin Schuhcc6070c2020-10-10 20:25:56 -0700572 ":realtime",
Austin Schuh77f3f222022-06-10 16:49:21 -0700573 "@com_github_gflags_gflags//:gflags",
574 "@com_github_google_glog//:glog",
575 "@com_google_googletest//:gtest",
Austin Schuhcc6070c2020-10-10 20:25:56 -0700576 ],
577)
Austin Schuh977a5ed2020-12-02 23:20:04 -0800578
579cc_test(
580 name = "flatbuffers_test",
581 srcs = [
582 "flatbuffers_test.cc",
583 ],
584 deps = [
585 ":flatbuffers",
586 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800587 ":json_to_flatbuffer_fbs",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800588 "//aos/testing:googletest",
davidjevans8b9b52f2021-09-17 08:57:30 -0700589 "//aos/testing:tmpdir",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800590 ],
591)
Austin Schuh0de30f32020-12-06 12:44:28 -0800592
593py_binary(
594 name = "flatbuffers_static",
595 srcs = ["flatbuffers_static.py"],
596 visibility = ["//visibility:public"],
597)
Austin Schuh4385b142021-03-14 21:31:13 -0700598
599cc_library(
600 name = "uuid",
601 srcs = ["uuid.cc"],
602 hdrs = ["uuid.h"],
603 target_compatible_with = ["@platforms//os:linux"],
604 visibility = ["//visibility:public"],
605 deps = [
Austin Schuh8902fa52021-03-14 22:39:24 -0700606 "@com_github_gflags_gflags//:gflags",
Austin Schuh4385b142021-03-14 21:31:13 -0700607 "@com_github_google_flatbuffers//:flatbuffers",
608 "@com_github_google_glog//:glog",
609 "@com_google_absl//absl/types:span",
610 ],
611)
612
613cc_test(
614 name = "uuid_test",
615 srcs = ["uuid_test.cc"],
616 target_compatible_with = ["@platforms//os:linux"],
617 deps = [
618 ":uuid",
619 "//aos/testing:googletest",
620 ],
621)
Austin Schuh30f74292021-08-13 17:25:26 -0700622
623cc_binary(
624 name = "aos_graph_channels",
625 srcs = [
626 "aos_graph_channels.cc",
627 ],
628 target_compatible_with = ["@platforms//os:linux"],
629 deps = [
630 "//aos:configuration",
631 "//aos:init",
632 "//aos:json_to_flatbuffer",
633 "//aos/events:simulated_event_loop",
634 "//aos/events/logging:log_reader",
635 "//aos/time",
636 "@com_github_gflags_gflags//:gflags",
637 "@com_github_google_glog//:glog",
638 ],
639)