blob: 025e78c2cf6277d9eadcca50dd6e0e53abba810b [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",
Austin Schuh44e0b142021-10-16 15:51:10 -070030 "//aos/starter:starter_stripped",
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
John Park398c74a2018-10-20 21:17:39 -0700149cc_binary(
150 name = "dump_rtprio",
151 srcs = [
152 "dump_rtprio.cc",
153 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800154 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700155 deps = [
Austin Schuh972e47e2018-12-20 17:20:58 -0800156 "//aos/time",
Brian Silverman3eb60d22021-11-04 19:06:47 -0700157 "@com_github_google_glog//:glog",
John Park398c74a2018-10-20 21:17:39 -0700158 ],
159)
160
161cc_library(
John Park398c74a2018-10-20 21:17:39 -0700162 name = "init",
163 srcs = [
164 "init.cc",
165 ],
166 hdrs = [
167 "init.h",
168 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800169 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800170 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700171 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700172 ":realtime",
John Park398c74a2018-10-20 21:17:39 -0700173 "//aos:die",
Austin Schuh972e47e2018-12-20 17:20:58 -0800174 "//aos/logging:implementations",
John Park398c74a2018-10-20 21:17:39 -0700175 ],
John Park398c74a2018-10-20 21:17:39 -0700176)
177
Alex Perrycb7da4b2019-08-28 19:35:56 -0700178cc_library(
179 name = "realtime",
180 srcs = [
181 "realtime.cc",
182 ],
183 hdrs = [
184 "realtime.h",
185 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800186 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700187 visibility = ["//visibility:public"],
188 deps = [
Austin Schuhcc6070c2020-10-10 20:25:56 -0700189 ":thread_local",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700190 "@com_github_google_glog//:glog",
191 ],
192)
193
Austin Schuhcb108412019-10-13 16:09:54 -0700194flatbuffer_cc_library(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700195 name = "configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700196 srcs = ["configuration.fbs"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700197 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800198 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700199 visibility = ["//visibility:public"],
Austin Schuhcb108412019-10-13 16:09:54 -0700200)
201
Alex Perryd5e13572020-02-22 15:15:08 -0800202flatbuffer_ts_library(
203 name = "configuration_ts_fbs",
204 srcs = ["configuration.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800205 target_compatible_with = ["@platforms//os:linux"],
Alex Perryd5e13572020-02-22 15:15:08 -0800206 visibility = ["//visibility:public"],
207)
208
Brian Silverman28760272020-02-02 13:21:51 -0800209flatbuffer_py_library(
James Kuszmaul7daef362019-12-31 18:28:17 -0800210 name = "configuration_fbs_python",
211 srcs = ["configuration.fbs"],
212 namespace = "aos",
213 tables = [
214 "Configuration",
215 "Channel",
James Kuszmaul84ff3e52020-01-03 19:48:53 -0800216 "Connection",
James Kuszmaul7daef362019-12-31 18:28:17 -0800217 "Map",
218 "Node",
219 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800220 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul7daef362019-12-31 18:28:17 -0800221 visibility = ["//visibility:public"],
222)
223
John Park398c74a2018-10-20 21:17:39 -0700224cc_library(
225 name = "configuration",
226 srcs = [
227 "configuration.cc",
228 ],
229 hdrs = [
230 "configuration.h",
231 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800232 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800233 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700234 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700235 ":configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700236 ":flatbuffer_merge",
237 ":flatbuffers",
238 ":json_to_flatbuffer",
John Park398c74a2018-10-20 21:17:39 -0700239 "//aos:unique_malloc_ptr",
Austin Schuh217a9782019-12-21 23:02:50 -0800240 "//aos/network:team_number",
Austin Schuhcb108412019-10-13 16:09:54 -0700241 "//aos/util:file",
242 "@com_github_google_glog//:glog",
243 "@com_google_absl//absl/container:btree",
244 "@com_google_absl//absl/strings",
John Park398c74a2018-10-20 21:17:39 -0700245 ],
John Park398c74a2018-10-20 21:17:39 -0700246)
247
James Kuszmaulabb77132020-08-01 19:56:16 -0700248flatbuffer_ts_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800249 name = "json_to_flatbuffer_fbs_ts",
James Kuszmaulabb77132020-08-01 19:56:16 -0700250 srcs = ["json_to_flatbuffer.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800251 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700252 visibility = ["//aos:__subpackages__"],
253)
254
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700255flatbuffer_cc_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800256 name = "json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700257 srcs = ["json_to_flatbuffer.fbs"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800258 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800259 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700260 visibility = ["//aos:__subpackages__"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700261)
262
263cc_library(
Austin Schuh43c6a352019-09-30 22:22:10 -0700264 name = "flatbuffer_utils",
265 srcs = ["flatbuffer_utils.cc"],
266 hdrs = ["flatbuffer_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800267 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh43c6a352019-09-30 22:22:10 -0700268 deps = [
269 "@com_github_google_flatbuffers//:flatbuffers",
Brian Silvermancf4fb662021-02-10 17:54:53 -0800270 "@com_github_google_glog//:glog",
Austin Schuh43c6a352019-09-30 22:22:10 -0700271 ],
272)
273
274cc_library(
Austin Schuhd7e252d2019-10-06 13:51:02 -0700275 name = "json_tokenizer",
276 srcs = ["json_tokenizer.cc"],
277 hdrs = ["json_tokenizer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800278 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhd7e252d2019-10-06 13:51:02 -0700279 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700280 "@com_github_google_glog//:glog",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700281 "@com_google_absl//absl/strings",
282 ],
283)
284
285cc_library(
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700286 name = "json_to_flatbuffer",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800287 srcs = [
288 "flatbuffer_introspection.cc",
289 "json_to_flatbuffer.cc",
290 ],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700291 hdrs = ["json_to_flatbuffer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800292 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700293 visibility = ["//visibility:public"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700294 deps = [
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700295 ":fast_string_builder",
Austin Schuh43c6a352019-09-30 22:22:10 -0700296 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700297 ":flatbuffers",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700298 ":json_tokenizer",
Austin Schuhbba10282021-03-20 22:03:28 -0700299 "//aos/util:file",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700300 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuhe93d8642019-10-13 15:27:07 -0700301 "@com_github_google_glog//:glog",
Austin Schuhd339a9b2019-10-05 21:33:32 -0700302 "@com_google_absl//absl/strings",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700303 ],
304)
305
306cc_test(
307 name = "json_to_flatbuffer_test",
308 srcs = [
309 "json_to_flatbuffer_test.cc",
310 ],
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800311 data = [
312 ":json_to_flatbuffer_fbs_reflection_out",
313 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800314 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700315 deps = [
316 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800317 ":json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700318 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700319 "//aos/testing:path",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700320 ],
321)
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700322
Tyler Chatow5e369a42019-11-23 11:57:31 -0800323cc_test(
324 name = "flatbuffer_introspection_test",
325 srcs = [
326 "flatbuffer_introspection_test.cc",
327 ],
328 data = [
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800329 ":json_to_flatbuffer_fbs_reflection_out",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800330 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800331 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800332 deps = [
333 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800334 ":json_to_flatbuffer_fbs",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800335 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700336 "//aos/testing:path",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800337 "//aos/util:file",
338 "@com_github_google_flatbuffers//:flatbuffers",
339 ],
340)
341
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700342cc_library(
343 name = "flatbuffer_merge",
344 srcs = ["flatbuffer_merge.cc"],
345 hdrs = ["flatbuffer_merge.h"],
346 copts = ["-Wno-cast-align"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800347 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700348 visibility = ["//visibility:public"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700349 deps = [
350 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700351 ":flatbuffers",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700352 "@com_github_google_flatbuffers//:flatbuffers",
353 ],
354)
355
356cc_test(
357 name = "flatbuffer_merge_test",
358 srcs = [
359 "flatbuffer_merge_test.cc",
360 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800361 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700362 deps = [
363 ":flatbuffer_merge",
364 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800365 ":json_to_flatbuffer_fbs",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700366 "//aos/testing:googletest",
367 ],
368)
Austin Schuhe93d8642019-10-13 15:27:07 -0700369
370cc_library(
371 name = "flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700372 srcs = [
373 "flatbuffers.cc",
374 ],
Austin Schuhe93d8642019-10-13 15:27:07 -0700375 hdrs = [
376 "flatbuffers.h",
377 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800378 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh40485ed2019-10-26 21:51:44 -0700379 visibility = ["//visibility:public"],
Austin Schuhe93d8642019-10-13 15:27:07 -0700380 deps = [
James Kuszmaulad8a8082020-02-14 21:21:58 -0800381 "//aos:macros",
Brian Silverman354697a2020-09-22 21:06:32 -0700382 "//aos/containers:resizeable_buffer",
davidjevans8b9b52f2021-09-17 08:57:30 -0700383 "//aos/util:file",
Austin Schuhe93d8642019-10-13 15:27:07 -0700384 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700385 "@com_github_google_glog//:glog",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700386 "@com_google_absl//absl/strings",
Austin Schuh6f3babe2020-01-26 20:34:50 -0800387 "@com_google_absl//absl/types:span",
Austin Schuhe93d8642019-10-13 15:27:07 -0700388 ],
389)
Austin Schuhcb108412019-10-13 16:09:54 -0700390
391cc_test(
392 name = "configuration_test",
393 srcs = [
394 "configuration_test.cc",
395 ],
396 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700397 "//aos/events:pingpong_config",
Austin Schuh6b9c4152019-11-29 12:45:24 -0800398 "//aos/events:pong.bfbs",
James Kuszmaulc0c08da2020-05-10 18:56:07 -0700399 "//aos/testdata:test_configs",
Austin Schuhcb108412019-10-13 16:09:54 -0700400 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800401 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcb108412019-10-13 16:09:54 -0700402 deps = [
403 ":configuration",
Austin Schuh1ef01ef2021-02-07 20:40:36 -0800404 "//aos/testing:flatbuffer_eq",
Austin Schuhcb108412019-10-13 16:09:54 -0700405 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700406 "//aos/testing:path",
Austin Schuhcb108412019-10-13 16:09:54 -0700407 "//aos/testing:test_logging",
408 ],
409)
Alex Perrycb7da4b2019-08-28 19:35:56 -0700410
411cc_binary(
412 name = "config_flattener",
413 srcs = [
414 "config_flattener.cc",
415 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800416 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700417 visibility = ["//visibility:public"],
418 deps = [
419 ":configuration",
420 ":init",
421 "//aos/util:file",
422 "@com_github_google_glog//:glog",
423 ],
424)
Tyler Chatow5e369a42019-11-23 11:57:31 -0800425
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800426cc_library(
427 name = "aos_cli_utils",
428 srcs = [
429 "aos_cli_utils.cc",
430 ],
431 hdrs = [
432 "aos_cli_utils.h",
433 ],
434 target_compatible_with = ["@platforms//os:linux"],
435 visibility = ["//visibility:public"],
436 deps = [
437 ":configuration",
438 "//aos:init",
439 "//aos/events:shm_event_loop",
440 "@com_github_google_glog//:glog",
441 ],
442)
443
Tyler Chatow5e369a42019-11-23 11:57:31 -0800444cc_binary(
Austin Schuh944df342019-12-21 17:08:55 -0800445 name = "aos_dump",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800446 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -0800447 "aos_dump.cc",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800448 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800449 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800450 visibility = ["//visibility:public"],
451 deps = [
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800452 ":aos_cli_utils",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800453 ":configuration",
454 ":json_to_flatbuffer",
455 "//aos:init",
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800456 "@com_github_google_glog//:glog",
457 ],
458)
459
460cc_binary(
461 name = "aos_send",
462 srcs = [
463 "aos_send.cc",
464 ],
465 target_compatible_with = ["@platforms//os:linux"],
466 visibility = ["//visibility:public"],
467 deps = [
468 ":aos_cli_utils",
469 ":configuration",
470 ":init",
471 ":json_to_flatbuffer",
472 "@com_github_gflags_gflags//:gflags",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800473 "@com_github_google_glog//:glog",
474 ],
475)
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500476
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700477cc_binary(
478 name = "aos_graph_nodes",
479 srcs = [
480 "aos_graph_nodes.cc",
481 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800482 target_compatible_with = ["@platforms//os:linux"],
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700483 visibility = ["//visibility:public"],
484 deps = [
485 ":configuration",
486 ":json_to_flatbuffer",
487 "//aos:init",
488 "//aos/events:shm_event_loop",
489 "@com_github_google_glog//:glog",
490 ],
491)
492
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500493cc_library(
494 name = "ftrace",
495 srcs = [
496 "ftrace.cc",
497 ],
498 hdrs = [
499 "ftrace.h",
500 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800501 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500502 visibility = ["//visibility:public"],
503 deps = [
504 "@com_github_google_glog//:glog",
505 ],
506)
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700507
508cc_library(
509 name = "fast_string_builder",
510 srcs = [
511 "fast_string_builder.cc",
512 ],
513 hdrs = [
514 "fast_string_builder.h",
515 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800516 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700517 deps = [
518 "@com_github_google_glog//:glog",
519 "@com_google_absl//absl/strings",
520 "@com_google_absl//absl/strings:str_format",
521 ],
522)
Brian Silvermanb47f5552020-10-01 15:08:14 -0700523
524cc_library(
525 name = "thread_local",
526 hdrs = [
527 "thread_local.h",
528 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800529 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb47f5552020-10-01 15:08:14 -0700530 visibility = ["//visibility:public"],
531)
Austin Schuhcc6070c2020-10-10 20:25:56 -0700532
533cc_test(
534 name = "realtime_test",
535 srcs = [
536 "realtime_test.cc",
537 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800538 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcc6070c2020-10-10 20:25:56 -0700539 visibility = ["//visibility:public"],
540 deps = [
541 ":realtime",
542 "//aos/testing:googletest",
543 ],
544)
Austin Schuh977a5ed2020-12-02 23:20:04 -0800545
546cc_test(
547 name = "flatbuffers_test",
548 srcs = [
549 "flatbuffers_test.cc",
550 ],
551 deps = [
552 ":flatbuffers",
553 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800554 ":json_to_flatbuffer_fbs",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800555 "//aos/testing:googletest",
davidjevans8b9b52f2021-09-17 08:57:30 -0700556 "//aos/testing:tmpdir",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800557 ],
558)
Austin Schuh0de30f32020-12-06 12:44:28 -0800559
560py_binary(
561 name = "flatbuffers_static",
562 srcs = ["flatbuffers_static.py"],
563 visibility = ["//visibility:public"],
564)
Austin Schuh4385b142021-03-14 21:31:13 -0700565
566cc_library(
567 name = "uuid",
568 srcs = ["uuid.cc"],
569 hdrs = ["uuid.h"],
570 target_compatible_with = ["@platforms//os:linux"],
571 visibility = ["//visibility:public"],
572 deps = [
Austin Schuh8902fa52021-03-14 22:39:24 -0700573 "@com_github_gflags_gflags//:gflags",
Austin Schuh4385b142021-03-14 21:31:13 -0700574 "@com_github_google_flatbuffers//:flatbuffers",
575 "@com_github_google_glog//:glog",
576 "@com_google_absl//absl/types:span",
577 ],
578)
579
580cc_test(
581 name = "uuid_test",
582 srcs = ["uuid_test.cc"],
583 target_compatible_with = ["@platforms//os:linux"],
584 deps = [
585 ":uuid",
586 "//aos/testing:googletest",
587 ],
588)
Austin Schuh30f74292021-08-13 17:25:26 -0700589
590cc_binary(
591 name = "aos_graph_channels",
592 srcs = [
593 "aos_graph_channels.cc",
594 ],
595 target_compatible_with = ["@platforms//os:linux"],
596 deps = [
597 "//aos:configuration",
598 "//aos:init",
599 "//aos:json_to_flatbuffer",
600 "//aos/events:simulated_event_loop",
601 "//aos/events/logging:log_reader",
602 "//aos/time",
603 "@com_github_gflags_gflags//:gflags",
604 "@com_github_google_glog//:glog",
605 ],
606)