blob: 8e2d8ac63729a057642526c28efe7e8ef7d78104 [file] [log] [blame]
Alex Perryd5e13572020-02-22 15:15:08 -08001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_ts_library")
Austin Schuh972e47e2018-12-20 17:20:58 -08002
Austin Schuh00e302a2020-12-21 11:53:30 -08003exports_files(["aos_dump_autocomplete.sh"])
4
Brian Silverman258b9172015-09-19 14:32:57 -04005filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -07006 name = "prime_binaries",
7 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -08008 "//aos:aos_dump",
Tyler Chatowe6f5bef2020-10-31 14:22:04 -07009 "//aos:aos_dump_autocomplete.sh",
Brian Silvermanea2c95f2021-02-10 18:10:26 -080010 "//aos:aos_send",
Austin Schuh91d8d062020-11-02 17:11:13 -080011 "//aos/starter",
Brian Silverman6470f442018-08-05 12:08:16 -070012 ],
13 visibility = ["//visibility:public"],
Austin Schuh1eceeb92015-11-08 21:16:06 -080014)
Austin Schuhc80dd152016-02-29 01:47:44 -080015
16filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070017 name = "prime_start_binaries",
18 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080019 "//aos/events/logging:logger_main",
Brian Silverman6470f442018-08-05 12:08:16 -070020 ],
21 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080022)
Brian Silverman6470f442018-08-05 12:08:16 -070023
Austin Schuhc80dd152016-02-29 01:47:44 -080024filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070025 name = "prime_binaries_stripped",
26 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -080027 "//aos:aos_dump.stripped",
Tyler Chatowe6f5bef2020-10-31 14:22:04 -070028 "//aos:aos_dump_autocomplete.sh",
Brian Silvermanea2c95f2021-02-10 18:10:26 -080029 "//aos:aos_send.stripped",
30 "//aos/starter",
Brian Silverman6470f442018-08-05 12:08:16 -070031 ],
32 visibility = ["//visibility:public"],
33)
34
35filegroup(
36 name = "prime_start_binaries_stripped",
37 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080038 "//aos/events/logging:logger_main.stripped",
Brian Silverman6470f442018-08-05 12:08:16 -070039 ],
40 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080041)
Sabina Davis2ed5ea22017-09-26 22:27:42 -070042
43cc_library(
John Park33858a32018-09-28 23:05:48 -070044 name = "math",
45 hdrs = [
46 "commonmath.h",
47 ],
John Park33858a32018-09-28 23:05:48 -070048 visibility = ["//visibility:public"],
49)
50
Brian Silverman6470f442018-08-05 12:08:16 -070051py_library(
52 name = "python_init",
53 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -080054 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070055 visibility = ["//visibility:public"],
Sabina Davis2ed5ea22017-09-26 22:27:42 -070056)
John Park33858a32018-09-28 23:05:48 -070057
58cc_library(
Austin Schuh972e47e2018-12-20 17:20:58 -080059 name = "macros",
60 hdrs = [
John Park33858a32018-09-28 23:05:48 -070061 "macros.h",
John Park33858a32018-09-28 23:05:48 -070062 ],
63 visibility = ["//visibility:public"],
64)
65
66cc_library(
67 name = "gtest_prod",
68 hdrs = [
69 "gtest_prod.h",
70 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080071 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070072 visibility = ["//visibility:public"],
73)
74
75cc_library(
John Park33858a32018-09-28 23:05:48 -070076 name = "unique_malloc_ptr",
77 hdrs = [
78 "unique_malloc_ptr.h",
79 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070081 visibility = ["//visibility:public"],
82)
83
84cc_library(
85 name = "condition",
86 srcs = [
87 "condition.cc",
88 ],
89 hdrs = [
90 "condition.h",
91 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080092 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070093 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -080094 deps = [
95 "//aos/ipc_lib:aos_sync",
Austin Schuh972e47e2018-12-20 17:20:58 -080096 "//aos/mutex",
Alex Perrycb7da4b2019-08-28 19:35:56 -070097 "@com_github_google_glog//:glog",
Austin Schuh972e47e2018-12-20 17:20:58 -080098 ],
John Park33858a32018-09-28 23:05:48 -070099)
100
101cc_test(
102 name = "condition_test",
103 srcs = [
104 "condition_test.cc",
105 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800106 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700107 deps = [
108 ":condition",
109 "//aos:die",
John Park398c74a2018-10-20 21:17:39 -0700110 "//aos/ipc_lib:aos_sync",
111 "//aos/ipc_lib:core_lib",
Austin Schuh972e47e2018-12-20 17:20:58 -0800112 "//aos/logging",
113 "//aos/mutex",
John Park33858a32018-09-28 23:05:48 -0700114 "//aos/testing:googletest",
115 "//aos/testing:prevent_exit",
116 "//aos/testing:test_shm",
Austin Schuh972e47e2018-12-20 17:20:58 -0800117 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700118 ],
119)
120
121cc_library(
122 name = "die",
123 srcs = [
124 "die.cc",
125 ],
126 hdrs = [
127 "die.h",
128 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800129 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800130 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -0700131 deps = [
132 "//aos:macros",
133 "//aos/libc:aos_strerror",
134 ],
John Park33858a32018-09-28 23:05:48 -0700135)
136
John Park33858a32018-09-28 23:05:48 -0700137cc_test(
138 name = "die_test",
139 srcs = [
140 "die_test.cc",
141 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800142 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700143 deps = [
144 ":die",
145 "//aos/testing:googletest",
146 ],
147)
148
149cc_library(
150 name = "event",
151 srcs = [
152 "event.cc",
153 ],
154 hdrs = [
155 "event.h",
156 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800157 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700158 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800159 deps = [
160 "//aos/ipc_lib:aos_sync",
Austin Schuh972e47e2018-12-20 17:20:58 -0800161 "//aos/time",
Austin Schuh91d8d062020-11-02 17:11:13 -0800162 "//aos/type_traits",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700163 "@com_github_google_glog//:glog",
Austin Schuh972e47e2018-12-20 17:20:58 -0800164 ],
John Park33858a32018-09-28 23:05:48 -0700165)
166
167cc_test(
168 name = "event_test",
169 srcs = [
170 "event_test.cc",
Austin Schuh972e47e2018-12-20 17:20:58 -0800171 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800172 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700173 deps = [
174 ":event",
John Park33858a32018-09-28 23:05:48 -0700175 "//aos/testing:googletest",
176 "//aos/testing:test_logging",
Austin Schuh972e47e2018-12-20 17:20:58 -0800177 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700178 ],
179)
John Park398c74a2018-10-20 21:17:39 -0700180
181cc_binary(
182 name = "dump_rtprio",
183 srcs = [
184 "dump_rtprio.cc",
185 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800186 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700187 deps = [
John Park398c74a2018-10-20 21:17:39 -0700188 "//aos/logging",
189 "//aos/logging:implementations",
Austin Schuh972e47e2018-12-20 17:20:58 -0800190 "//aos/time",
John Park398c74a2018-10-20 21:17:39 -0700191 ],
192)
193
194cc_library(
John Park398c74a2018-10-20 21:17:39 -0700195 name = "complex_thread_local",
196 srcs = [
197 "complex_thread_local.cc",
198 ],
199 hdrs = [
200 "complex_thread_local.h",
201 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800202 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700203 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800204 deps = [
205 "//aos:die",
John Park65170ac2020-01-08 20:15:24 -0800206 "@com_google_absl//absl/base",
Austin Schuh972e47e2018-12-20 17:20:58 -0800207 ],
John Park398c74a2018-10-20 21:17:39 -0700208)
209
210cc_test(
211 name = "complex_thread_local_test",
212 srcs = [
213 "complex_thread_local_test.cc",
214 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800215 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700216 deps = [
217 ":complex_thread_local",
218 "//aos/logging",
John Park398c74a2018-10-20 21:17:39 -0700219 "//aos/testing:googletest",
220 ],
221)
222
223cc_library(
224 name = "init",
225 srcs = [
226 "init.cc",
227 ],
228 hdrs = [
229 "init.h",
230 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800231 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800232 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700233 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700234 ":realtime",
John Park398c74a2018-10-20 21:17:39 -0700235 "//aos:die",
Austin Schuh972e47e2018-12-20 17:20:58 -0800236 "//aos/logging:implementations",
John Park398c74a2018-10-20 21:17:39 -0700237 ],
John Park398c74a2018-10-20 21:17:39 -0700238)
239
Alex Perrycb7da4b2019-08-28 19:35:56 -0700240cc_library(
241 name = "realtime",
242 srcs = [
243 "realtime.cc",
244 ],
245 hdrs = [
246 "realtime.h",
247 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800248 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700249 visibility = ["//visibility:public"],
250 deps = [
Austin Schuhcc6070c2020-10-10 20:25:56 -0700251 ":thread_local",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700252 "@com_github_google_glog//:glog",
253 ],
254)
255
Austin Schuhcb108412019-10-13 16:09:54 -0700256flatbuffer_cc_library(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700257 name = "configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700258 srcs = ["configuration.fbs"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700259 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800260 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700261 visibility = ["//visibility:public"],
Austin Schuhcb108412019-10-13 16:09:54 -0700262)
263
Alex Perryd5e13572020-02-22 15:15:08 -0800264flatbuffer_ts_library(
265 name = "configuration_ts_fbs",
266 srcs = ["configuration.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800267 target_compatible_with = ["@platforms//os:linux"],
Alex Perryd5e13572020-02-22 15:15:08 -0800268 visibility = ["//visibility:public"],
269)
270
Brian Silverman28760272020-02-02 13:21:51 -0800271flatbuffer_py_library(
James Kuszmaul7daef362019-12-31 18:28:17 -0800272 name = "configuration_fbs_python",
273 srcs = ["configuration.fbs"],
274 namespace = "aos",
275 tables = [
276 "Configuration",
277 "Channel",
James Kuszmaul84ff3e52020-01-03 19:48:53 -0800278 "Connection",
James Kuszmaul7daef362019-12-31 18:28:17 -0800279 "Map",
280 "Node",
281 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800282 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul7daef362019-12-31 18:28:17 -0800283 visibility = ["//visibility:public"],
284)
285
John Park398c74a2018-10-20 21:17:39 -0700286cc_library(
287 name = "configuration",
288 srcs = [
289 "configuration.cc",
290 ],
291 hdrs = [
292 "configuration.h",
293 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800294 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800295 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700296 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700297 ":configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700298 ":flatbuffer_merge",
299 ":flatbuffers",
300 ":json_to_flatbuffer",
John Park398c74a2018-10-20 21:17:39 -0700301 "//aos:unique_malloc_ptr",
Austin Schuh217a9782019-12-21 23:02:50 -0800302 "//aos/network:team_number",
Austin Schuhcb108412019-10-13 16:09:54 -0700303 "//aos/util:file",
304 "@com_github_google_glog//:glog",
305 "@com_google_absl//absl/container:btree",
306 "@com_google_absl//absl/strings",
John Park398c74a2018-10-20 21:17:39 -0700307 ],
John Park398c74a2018-10-20 21:17:39 -0700308)
309
Brian Silvermanf819b442019-01-20 16:51:04 -0800310cc_library(
311 name = "make_unique",
312 hdrs = [
313 "make_unique.h",
314 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800315 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf819b442019-01-20 16:51:04 -0800316 visibility = ["//visibility:public"],
317)
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700318
James Kuszmaulabb77132020-08-01 19:56:16 -0700319flatbuffer_ts_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800320 name = "json_to_flatbuffer_fbs_ts",
James Kuszmaulabb77132020-08-01 19:56:16 -0700321 srcs = ["json_to_flatbuffer.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800322 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700323 visibility = ["//aos:__subpackages__"],
324)
325
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700326flatbuffer_cc_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800327 name = "json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700328 srcs = ["json_to_flatbuffer.fbs"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800329 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800330 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700331 visibility = ["//aos:__subpackages__"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700332)
333
334cc_library(
Austin Schuh43c6a352019-09-30 22:22:10 -0700335 name = "flatbuffer_utils",
336 srcs = ["flatbuffer_utils.cc"],
337 hdrs = ["flatbuffer_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800338 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh43c6a352019-09-30 22:22:10 -0700339 deps = [
340 "@com_github_google_flatbuffers//:flatbuffers",
Brian Silvermancf4fb662021-02-10 17:54:53 -0800341 "@com_github_google_glog//:glog",
Austin Schuh43c6a352019-09-30 22:22:10 -0700342 ],
343)
344
345cc_library(
Austin Schuhd7e252d2019-10-06 13:51:02 -0700346 name = "json_tokenizer",
347 srcs = ["json_tokenizer.cc"],
348 hdrs = ["json_tokenizer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800349 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhd7e252d2019-10-06 13:51:02 -0700350 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700351 "@com_github_google_glog//:glog",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700352 "@com_google_absl//absl/strings",
353 ],
354)
355
356cc_library(
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700357 name = "json_to_flatbuffer",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800358 srcs = [
359 "flatbuffer_introspection.cc",
360 "json_to_flatbuffer.cc",
361 ],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700362 hdrs = ["json_to_flatbuffer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800363 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700364 visibility = ["//visibility:public"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700365 deps = [
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700366 ":fast_string_builder",
Austin Schuh43c6a352019-09-30 22:22:10 -0700367 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700368 ":flatbuffers",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700369 ":json_tokenizer",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700370 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuhe93d8642019-10-13 15:27:07 -0700371 "@com_github_google_glog//:glog",
Austin Schuhd339a9b2019-10-05 21:33:32 -0700372 "@com_google_absl//absl/strings",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700373 ],
374)
375
376cc_test(
377 name = "json_to_flatbuffer_test",
378 srcs = [
379 "json_to_flatbuffer_test.cc",
380 ],
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800381 data = [
382 ":json_to_flatbuffer_fbs_reflection_out",
383 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800384 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700385 deps = [
386 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800387 ":json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700388 "//aos/testing:googletest",
389 ],
390)
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700391
Tyler Chatow5e369a42019-11-23 11:57:31 -0800392cc_test(
393 name = "flatbuffer_introspection_test",
394 srcs = [
395 "flatbuffer_introspection_test.cc",
396 ],
397 data = [
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800398 ":json_to_flatbuffer_fbs_reflection_out",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800399 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800400 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800401 deps = [
402 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800403 ":json_to_flatbuffer_fbs",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800404 "//aos/testing:googletest",
405 "//aos/util:file",
406 "@com_github_google_flatbuffers//:flatbuffers",
407 ],
408)
409
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700410cc_library(
411 name = "flatbuffer_merge",
412 srcs = ["flatbuffer_merge.cc"],
413 hdrs = ["flatbuffer_merge.h"],
414 copts = ["-Wno-cast-align"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800415 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700416 visibility = ["//visibility:public"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700417 deps = [
418 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700419 ":flatbuffers",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700420 "@com_github_google_flatbuffers//:flatbuffers",
421 ],
422)
423
424cc_test(
425 name = "flatbuffer_merge_test",
426 srcs = [
427 "flatbuffer_merge_test.cc",
428 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800429 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700430 deps = [
431 ":flatbuffer_merge",
432 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800433 ":json_to_flatbuffer_fbs",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700434 "//aos/testing:googletest",
435 ],
436)
Austin Schuhe93d8642019-10-13 15:27:07 -0700437
438cc_library(
439 name = "flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700440 srcs = [
441 "flatbuffers.cc",
442 ],
Austin Schuhe93d8642019-10-13 15:27:07 -0700443 hdrs = [
444 "flatbuffers.h",
445 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800446 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh40485ed2019-10-26 21:51:44 -0700447 visibility = ["//visibility:public"],
Austin Schuhe93d8642019-10-13 15:27:07 -0700448 deps = [
James Kuszmaulad8a8082020-02-14 21:21:58 -0800449 "//aos:macros",
Brian Silverman354697a2020-09-22 21:06:32 -0700450 "//aos/containers:resizeable_buffer",
Austin Schuhe93d8642019-10-13 15:27:07 -0700451 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700452 "@com_github_google_glog//:glog",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700453 "@com_google_absl//absl/strings",
Austin Schuh6f3babe2020-01-26 20:34:50 -0800454 "@com_google_absl//absl/types:span",
Austin Schuhe93d8642019-10-13 15:27:07 -0700455 ],
456)
Austin Schuhcb108412019-10-13 16:09:54 -0700457
458cc_test(
459 name = "configuration_test",
460 srcs = [
461 "configuration_test.cc",
462 ],
463 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700464 "//aos/events:pingpong_config",
Austin Schuh6b9c4152019-11-29 12:45:24 -0800465 "//aos/events:pong.bfbs",
James Kuszmaulc0c08da2020-05-10 18:56:07 -0700466 "//aos/testdata:test_configs",
Austin Schuhcb108412019-10-13 16:09:54 -0700467 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800468 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcb108412019-10-13 16:09:54 -0700469 deps = [
470 ":configuration",
Austin Schuh1ef01ef2021-02-07 20:40:36 -0800471 "//aos/testing:flatbuffer_eq",
Austin Schuhcb108412019-10-13 16:09:54 -0700472 "//aos/testing:googletest",
473 "//aos/testing:test_logging",
474 ],
475)
Alex Perrycb7da4b2019-08-28 19:35:56 -0700476
477cc_binary(
478 name = "config_flattener",
479 srcs = [
480 "config_flattener.cc",
481 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800482 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700483 visibility = ["//visibility:public"],
484 deps = [
485 ":configuration",
486 ":init",
487 "//aos/util:file",
488 "@com_github_google_glog//:glog",
489 ],
490)
Tyler Chatow5e369a42019-11-23 11:57:31 -0800491
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800492cc_library(
493 name = "aos_cli_utils",
494 srcs = [
495 "aos_cli_utils.cc",
496 ],
497 hdrs = [
498 "aos_cli_utils.h",
499 ],
500 target_compatible_with = ["@platforms//os:linux"],
501 visibility = ["//visibility:public"],
502 deps = [
503 ":configuration",
504 "//aos:init",
505 "//aos/events:shm_event_loop",
506 "@com_github_google_glog//:glog",
507 ],
508)
509
Tyler Chatow5e369a42019-11-23 11:57:31 -0800510cc_binary(
Austin Schuh944df342019-12-21 17:08:55 -0800511 name = "aos_dump",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800512 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -0800513 "aos_dump.cc",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800514 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800515 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800516 visibility = ["//visibility:public"],
517 deps = [
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800518 ":aos_cli_utils",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800519 ":configuration",
520 ":json_to_flatbuffer",
521 "//aos:init",
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800522 "@com_github_google_glog//:glog",
523 ],
524)
525
526cc_binary(
527 name = "aos_send",
528 srcs = [
529 "aos_send.cc",
530 ],
531 target_compatible_with = ["@platforms//os:linux"],
532 visibility = ["//visibility:public"],
533 deps = [
534 ":aos_cli_utils",
535 ":configuration",
536 ":init",
537 ":json_to_flatbuffer",
538 "@com_github_gflags_gflags//:gflags",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800539 "@com_github_google_glog//:glog",
540 ],
541)
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500542
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700543cc_binary(
544 name = "aos_graph_nodes",
545 srcs = [
546 "aos_graph_nodes.cc",
547 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800548 target_compatible_with = ["@platforms//os:linux"],
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700549 visibility = ["//visibility:public"],
550 deps = [
551 ":configuration",
552 ":json_to_flatbuffer",
553 "//aos:init",
554 "//aos/events:shm_event_loop",
555 "@com_github_google_glog//:glog",
556 ],
557)
558
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500559cc_library(
560 name = "ftrace",
561 srcs = [
562 "ftrace.cc",
563 ],
564 hdrs = [
565 "ftrace.h",
566 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800567 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500568 visibility = ["//visibility:public"],
569 deps = [
570 "@com_github_google_glog//:glog",
571 ],
572)
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700573
574cc_library(
575 name = "fast_string_builder",
576 srcs = [
577 "fast_string_builder.cc",
578 ],
579 hdrs = [
580 "fast_string_builder.h",
581 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800582 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700583 deps = [
584 "@com_github_google_glog//:glog",
585 "@com_google_absl//absl/strings",
586 "@com_google_absl//absl/strings:str_format",
587 ],
588)
Brian Silvermanb47f5552020-10-01 15:08:14 -0700589
590cc_library(
591 name = "thread_local",
592 hdrs = [
593 "thread_local.h",
594 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800595 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb47f5552020-10-01 15:08:14 -0700596 visibility = ["//visibility:public"],
597)
Austin Schuhcc6070c2020-10-10 20:25:56 -0700598
599cc_test(
600 name = "realtime_test",
601 srcs = [
602 "realtime_test.cc",
603 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800604 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcc6070c2020-10-10 20:25:56 -0700605 visibility = ["//visibility:public"],
606 deps = [
607 ":realtime",
608 "//aos/testing:googletest",
609 ],
610)
Austin Schuh977a5ed2020-12-02 23:20:04 -0800611
612cc_test(
613 name = "flatbuffers_test",
614 srcs = [
615 "flatbuffers_test.cc",
616 ],
617 deps = [
618 ":flatbuffers",
619 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800620 ":json_to_flatbuffer_fbs",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800621 "//aos/testing:googletest",
622 ],
623)
Austin Schuh0de30f32020-12-06 12:44:28 -0800624
625py_binary(
626 name = "flatbuffers_static",
627 srcs = ["flatbuffers_static.py"],
628 visibility = ["//visibility:public"],
629)