blob: 2bd0ec8a644b2029a5b4b1eb56ea11f6b363a9ae [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"],
James Kuszmaul4ed5fb12022-03-22 15:20:04 -0700268 visibility = ["//visibility:public"],
Austin Schuh43c6a352019-09-30 22:22:10 -0700269 deps = [
270 "@com_github_google_flatbuffers//:flatbuffers",
Brian Silvermancf4fb662021-02-10 17:54:53 -0800271 "@com_github_google_glog//:glog",
Austin Schuh43c6a352019-09-30 22:22:10 -0700272 ],
273)
274
275cc_library(
Austin Schuhd7e252d2019-10-06 13:51:02 -0700276 name = "json_tokenizer",
277 srcs = ["json_tokenizer.cc"],
278 hdrs = ["json_tokenizer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800279 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhd7e252d2019-10-06 13:51:02 -0700280 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700281 "@com_github_google_glog//:glog",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700282 "@com_google_absl//absl/strings",
283 ],
284)
285
286cc_library(
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700287 name = "json_to_flatbuffer",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800288 srcs = [
289 "flatbuffer_introspection.cc",
290 "json_to_flatbuffer.cc",
291 ],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700292 hdrs = ["json_to_flatbuffer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800293 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700294 visibility = ["//visibility:public"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700295 deps = [
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700296 ":fast_string_builder",
Austin Schuh43c6a352019-09-30 22:22:10 -0700297 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700298 ":flatbuffers",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700299 ":json_tokenizer",
Austin Schuhbba10282021-03-20 22:03:28 -0700300 "//aos/util:file",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700301 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuhe93d8642019-10-13 15:27:07 -0700302 "@com_github_google_glog//:glog",
Austin Schuhd339a9b2019-10-05 21:33:32 -0700303 "@com_google_absl//absl/strings",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700304 ],
305)
306
307cc_test(
308 name = "json_to_flatbuffer_test",
309 srcs = [
310 "json_to_flatbuffer_test.cc",
311 ],
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800312 data = [
313 ":json_to_flatbuffer_fbs_reflection_out",
314 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800315 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700316 deps = [
317 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800318 ":json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700319 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700320 "//aos/testing:path",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700321 ],
322)
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700323
Tyler Chatow5e369a42019-11-23 11:57:31 -0800324cc_test(
325 name = "flatbuffer_introspection_test",
326 srcs = [
327 "flatbuffer_introspection_test.cc",
328 ],
329 data = [
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800330 ":json_to_flatbuffer_fbs_reflection_out",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800331 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800332 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800333 deps = [
334 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800335 ":json_to_flatbuffer_fbs",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800336 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700337 "//aos/testing:path",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800338 "//aos/util:file",
339 "@com_github_google_flatbuffers//:flatbuffers",
340 ],
341)
342
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700343cc_library(
344 name = "flatbuffer_merge",
345 srcs = ["flatbuffer_merge.cc"],
346 hdrs = ["flatbuffer_merge.h"],
347 copts = ["-Wno-cast-align"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800348 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700349 visibility = ["//visibility:public"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700350 deps = [
351 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700352 ":flatbuffers",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700353 "@com_github_google_flatbuffers//:flatbuffers",
354 ],
355)
356
357cc_test(
358 name = "flatbuffer_merge_test",
359 srcs = [
360 "flatbuffer_merge_test.cc",
361 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800362 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700363 deps = [
364 ":flatbuffer_merge",
365 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800366 ":json_to_flatbuffer_fbs",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700367 "//aos/testing:googletest",
368 ],
369)
Austin Schuhe93d8642019-10-13 15:27:07 -0700370
371cc_library(
372 name = "flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700373 srcs = [
374 "flatbuffers.cc",
375 ],
Austin Schuhe93d8642019-10-13 15:27:07 -0700376 hdrs = [
377 "flatbuffers.h",
378 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800379 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh40485ed2019-10-26 21:51:44 -0700380 visibility = ["//visibility:public"],
Austin Schuhe93d8642019-10-13 15:27:07 -0700381 deps = [
James Kuszmaulad8a8082020-02-14 21:21:58 -0800382 "//aos:macros",
Brian Silverman354697a2020-09-22 21:06:32 -0700383 "//aos/containers:resizeable_buffer",
davidjevans8b9b52f2021-09-17 08:57:30 -0700384 "//aos/util:file",
Austin Schuhe93d8642019-10-13 15:27:07 -0700385 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700386 "@com_github_google_glog//:glog",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700387 "@com_google_absl//absl/strings",
Austin Schuh6f3babe2020-01-26 20:34:50 -0800388 "@com_google_absl//absl/types:span",
Austin Schuhe93d8642019-10-13 15:27:07 -0700389 ],
390)
Austin Schuhcb108412019-10-13 16:09:54 -0700391
392cc_test(
393 name = "configuration_test",
394 srcs = [
395 "configuration_test.cc",
396 ],
397 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700398 "//aos/events:pingpong_config",
Brian Silvermandae15a12022-07-23 12:55:20 -0700399 "//aos/events:pong_fbs_reflection_out",
James Kuszmaulc0c08da2020-05-10 18:56:07 -0700400 "//aos/testdata:test_configs",
Austin Schuhcb108412019-10-13 16:09:54 -0700401 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800402 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcb108412019-10-13 16:09:54 -0700403 deps = [
404 ":configuration",
Austin Schuh1ef01ef2021-02-07 20:40:36 -0800405 "//aos/testing:flatbuffer_eq",
Austin Schuhcb108412019-10-13 16:09:54 -0700406 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700407 "//aos/testing:path",
Austin Schuhcb108412019-10-13 16:09:54 -0700408 "//aos/testing:test_logging",
409 ],
410)
Alex Perrycb7da4b2019-08-28 19:35:56 -0700411
412cc_binary(
413 name = "config_flattener",
414 srcs = [
415 "config_flattener.cc",
416 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800417 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700418 visibility = ["//visibility:public"],
419 deps = [
420 ":configuration",
421 ":init",
422 "//aos/util:file",
423 "@com_github_google_glog//:glog",
424 ],
425)
Tyler Chatow5e369a42019-11-23 11:57:31 -0800426
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800427cc_library(
428 name = "aos_cli_utils",
429 srcs = [
430 "aos_cli_utils.cc",
431 ],
432 hdrs = [
433 "aos_cli_utils.h",
434 ],
435 target_compatible_with = ["@platforms//os:linux"],
436 visibility = ["//visibility:public"],
437 deps = [
438 ":configuration",
439 "//aos:init",
440 "//aos/events:shm_event_loop",
441 "@com_github_google_glog//:glog",
442 ],
443)
444
Tyler Chatow5e369a42019-11-23 11:57:31 -0800445cc_binary(
Austin Schuh944df342019-12-21 17:08:55 -0800446 name = "aos_dump",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800447 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -0800448 "aos_dump.cc",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800449 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800450 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800451 visibility = ["//visibility:public"],
452 deps = [
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800453 ":aos_cli_utils",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800454 ":configuration",
455 ":json_to_flatbuffer",
456 "//aos:init",
Brian Silvermanea2c95f2021-02-10 18:10:26 -0800457 "@com_github_google_glog//:glog",
458 ],
459)
460
461cc_binary(
462 name = "aos_send",
463 srcs = [
464 "aos_send.cc",
465 ],
466 target_compatible_with = ["@platforms//os:linux"],
467 visibility = ["//visibility:public"],
468 deps = [
469 ":aos_cli_utils",
470 ":configuration",
471 ":init",
472 ":json_to_flatbuffer",
473 "@com_github_gflags_gflags//:gflags",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800474 "@com_github_google_glog//:glog",
475 ],
476)
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500477
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700478cc_binary(
479 name = "aos_graph_nodes",
480 srcs = [
481 "aos_graph_nodes.cc",
482 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800483 target_compatible_with = ["@platforms//os:linux"],
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700484 visibility = ["//visibility:public"],
485 deps = [
486 ":configuration",
487 ":json_to_flatbuffer",
488 "//aos:init",
489 "//aos/events:shm_event_loop",
490 "@com_github_google_glog//:glog",
491 ],
492)
493
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500494cc_library(
495 name = "ftrace",
496 srcs = [
497 "ftrace.cc",
498 ],
499 hdrs = [
500 "ftrace.h",
501 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800502 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500503 visibility = ["//visibility:public"],
504 deps = [
505 "@com_github_google_glog//:glog",
506 ],
507)
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700508
509cc_library(
510 name = "fast_string_builder",
511 srcs = [
512 "fast_string_builder.cc",
513 ],
514 hdrs = [
515 "fast_string_builder.h",
516 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800517 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul4ed5fb12022-03-22 15:20:04 -0700518 visibility = ["//visibility:public"],
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700519 deps = [
520 "@com_github_google_glog//:glog",
521 "@com_google_absl//absl/strings",
522 "@com_google_absl//absl/strings:str_format",
523 ],
524)
Brian Silvermanb47f5552020-10-01 15:08:14 -0700525
526cc_library(
527 name = "thread_local",
528 hdrs = [
529 "thread_local.h",
530 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800531 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb47f5552020-10-01 15:08:14 -0700532 visibility = ["//visibility:public"],
533)
Austin Schuhcc6070c2020-10-10 20:25:56 -0700534
535cc_test(
536 name = "realtime_test",
537 srcs = [
538 "realtime_test.cc",
539 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800540 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcc6070c2020-10-10 20:25:56 -0700541 visibility = ["//visibility:public"],
542 deps = [
Austin Schuh77f3f222022-06-10 16:49:21 -0700543 ":init",
Austin Schuhcc6070c2020-10-10 20:25:56 -0700544 ":realtime",
Austin Schuh77f3f222022-06-10 16:49:21 -0700545 "@com_github_gflags_gflags//:gflags",
546 "@com_github_google_glog//:glog",
547 "@com_google_googletest//:gtest",
Austin Schuhcc6070c2020-10-10 20:25:56 -0700548 ],
549)
Austin Schuh977a5ed2020-12-02 23:20:04 -0800550
551cc_test(
552 name = "flatbuffers_test",
553 srcs = [
554 "flatbuffers_test.cc",
555 ],
556 deps = [
557 ":flatbuffers",
558 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800559 ":json_to_flatbuffer_fbs",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800560 "//aos/testing:googletest",
davidjevans8b9b52f2021-09-17 08:57:30 -0700561 "//aos/testing:tmpdir",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800562 ],
563)
Austin Schuh0de30f32020-12-06 12:44:28 -0800564
565py_binary(
566 name = "flatbuffers_static",
567 srcs = ["flatbuffers_static.py"],
568 visibility = ["//visibility:public"],
569)
Austin Schuh4385b142021-03-14 21:31:13 -0700570
571cc_library(
572 name = "uuid",
573 srcs = ["uuid.cc"],
574 hdrs = ["uuid.h"],
575 target_compatible_with = ["@platforms//os:linux"],
576 visibility = ["//visibility:public"],
577 deps = [
Austin Schuh8902fa52021-03-14 22:39:24 -0700578 "@com_github_gflags_gflags//:gflags",
Austin Schuh4385b142021-03-14 21:31:13 -0700579 "@com_github_google_flatbuffers//:flatbuffers",
580 "@com_github_google_glog//:glog",
581 "@com_google_absl//absl/types:span",
582 ],
583)
584
585cc_test(
586 name = "uuid_test",
587 srcs = ["uuid_test.cc"],
588 target_compatible_with = ["@platforms//os:linux"],
589 deps = [
590 ":uuid",
591 "//aos/testing:googletest",
592 ],
593)
Austin Schuh30f74292021-08-13 17:25:26 -0700594
595cc_binary(
596 name = "aos_graph_channels",
597 srcs = [
598 "aos_graph_channels.cc",
599 ],
600 target_compatible_with = ["@platforms//os:linux"],
601 deps = [
602 "//aos:configuration",
603 "//aos:init",
604 "//aos:json_to_flatbuffer",
605 "//aos/events:simulated_event_loop",
606 "//aos/events/logging:log_reader",
607 "//aos/time",
608 "@com_github_gflags_gflags//:gflags",
609 "@com_github_google_glog//:glog",
610 ],
611)