blob: 7c976b1db1083b3f00f4395f7057e27810ca9d81 [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",
Austin Schuh91d8d062020-11-02 17:11:13 -080010 "//aos/starter",
Brian Silverman6470f442018-08-05 12:08:16 -070011 ],
12 visibility = ["//visibility:public"],
Austin Schuh1eceeb92015-11-08 21:16:06 -080013)
Austin Schuhc80dd152016-02-29 01:47:44 -080014
15filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070016 name = "prime_start_binaries",
17 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080018 "//aos/events/logging:logger_main",
Brian Silverman6470f442018-08-05 12:08:16 -070019 ],
20 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080021)
Brian Silverman6470f442018-08-05 12:08:16 -070022
Austin Schuhc80dd152016-02-29 01:47:44 -080023filegroup(
Brian Silverman6470f442018-08-05 12:08:16 -070024 name = "prime_binaries_stripped",
25 srcs = [
26 # starter is hard coded to look for a non-stripped core...
Austin Schuh944df342019-12-21 17:08:55 -080027 "//aos:aos_dump.stripped",
John Park398c74a2018-10-20 21:17:39 -070028 "//aos/starter",
Tyler Chatowe6f5bef2020-10-31 14:22:04 -070029 "//aos:aos_dump_autocomplete.sh",
Brian Silverman6470f442018-08-05 12:08:16 -070030 ],
31 visibility = ["//visibility:public"],
32)
33
34filegroup(
35 name = "prime_start_binaries_stripped",
36 srcs = [
James Kuszmaul38735e82019-12-07 16:42:06 -080037 "//aos/events/logging:logger_main.stripped",
Brian Silverman6470f442018-08-05 12:08:16 -070038 ],
39 visibility = ["//visibility:public"],
Austin Schuhc80dd152016-02-29 01:47:44 -080040)
Sabina Davis2ed5ea22017-09-26 22:27:42 -070041
42cc_library(
John Park33858a32018-09-28 23:05:48 -070043 name = "math",
44 hdrs = [
45 "commonmath.h",
46 ],
John Park33858a32018-09-28 23:05:48 -070047 visibility = ["//visibility:public"],
48)
49
Brian Silverman6470f442018-08-05 12:08:16 -070050py_library(
51 name = "python_init",
52 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -080053 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070054 visibility = ["//visibility:public"],
Sabina Davis2ed5ea22017-09-26 22:27:42 -070055)
John Park33858a32018-09-28 23:05:48 -070056
57cc_library(
Austin Schuh972e47e2018-12-20 17:20:58 -080058 name = "macros",
59 hdrs = [
John Park33858a32018-09-28 23:05:48 -070060 "macros.h",
John Park33858a32018-09-28 23:05:48 -070061 ],
62 visibility = ["//visibility:public"],
63)
64
65cc_library(
66 name = "gtest_prod",
67 hdrs = [
68 "gtest_prod.h",
69 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080070 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070071 visibility = ["//visibility:public"],
72)
73
74cc_library(
John Park33858a32018-09-28 23:05:48 -070075 name = "unique_malloc_ptr",
76 hdrs = [
77 "unique_malloc_ptr.h",
78 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080079 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070080 visibility = ["//visibility:public"],
81)
82
83cc_library(
84 name = "condition",
85 srcs = [
86 "condition.cc",
87 ],
88 hdrs = [
89 "condition.h",
90 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080091 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -070092 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -080093 deps = [
94 "//aos/ipc_lib:aos_sync",
Austin Schuh972e47e2018-12-20 17:20:58 -080095 "//aos/mutex",
Alex Perrycb7da4b2019-08-28 19:35:56 -070096 "@com_github_google_glog//:glog",
Austin Schuh972e47e2018-12-20 17:20:58 -080097 ],
John Park33858a32018-09-28 23:05:48 -070098)
99
100cc_test(
101 name = "condition_test",
102 srcs = [
103 "condition_test.cc",
104 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800105 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700106 deps = [
107 ":condition",
108 "//aos:die",
John Park398c74a2018-10-20 21:17:39 -0700109 "//aos/ipc_lib:aos_sync",
110 "//aos/ipc_lib:core_lib",
Austin Schuh972e47e2018-12-20 17:20:58 -0800111 "//aos/logging",
112 "//aos/mutex",
John Park33858a32018-09-28 23:05:48 -0700113 "//aos/testing:googletest",
114 "//aos/testing:prevent_exit",
115 "//aos/testing:test_shm",
Austin Schuh972e47e2018-12-20 17:20:58 -0800116 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700117 ],
118)
119
120cc_library(
121 name = "die",
122 srcs = [
123 "die.cc",
124 ],
125 hdrs = [
126 "die.h",
127 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800128 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800129 visibility = ["//visibility:public"],
John Park33858a32018-09-28 23:05:48 -0700130 deps = [
131 "//aos:macros",
132 "//aos/libc:aos_strerror",
133 ],
John Park33858a32018-09-28 23:05:48 -0700134)
135
John Park33858a32018-09-28 23:05:48 -0700136cc_test(
137 name = "die_test",
138 srcs = [
139 "die_test.cc",
140 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800141 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700142 deps = [
143 ":die",
144 "//aos/testing:googletest",
145 ],
146)
147
148cc_library(
149 name = "event",
150 srcs = [
151 "event.cc",
152 ],
153 hdrs = [
154 "event.h",
155 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800156 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700157 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800158 deps = [
159 "//aos/ipc_lib:aos_sync",
Austin Schuh972e47e2018-12-20 17:20:58 -0800160 "//aos/time",
Austin Schuh91d8d062020-11-02 17:11:13 -0800161 "//aos/type_traits",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700162 "@com_github_google_glog//:glog",
Austin Schuh972e47e2018-12-20 17:20:58 -0800163 ],
John Park33858a32018-09-28 23:05:48 -0700164)
165
166cc_test(
167 name = "event_test",
168 srcs = [
169 "event_test.cc",
Austin Schuh972e47e2018-12-20 17:20:58 -0800170 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800171 target_compatible_with = ["@platforms//os:linux"],
John Park33858a32018-09-28 23:05:48 -0700172 deps = [
173 ":event",
John Park33858a32018-09-28 23:05:48 -0700174 "//aos/testing:googletest",
175 "//aos/testing:test_logging",
Austin Schuh972e47e2018-12-20 17:20:58 -0800176 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700177 ],
178)
John Park398c74a2018-10-20 21:17:39 -0700179
180cc_binary(
181 name = "dump_rtprio",
182 srcs = [
183 "dump_rtprio.cc",
184 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800185 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700186 deps = [
John Park398c74a2018-10-20 21:17:39 -0700187 "//aos/logging",
188 "//aos/logging:implementations",
Austin Schuh972e47e2018-12-20 17:20:58 -0800189 "//aos/time",
John Park398c74a2018-10-20 21:17:39 -0700190 ],
191)
192
193cc_library(
John Park398c74a2018-10-20 21:17:39 -0700194 name = "complex_thread_local",
195 srcs = [
196 "complex_thread_local.cc",
197 ],
198 hdrs = [
199 "complex_thread_local.h",
200 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800201 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700202 visibility = ["//visibility:public"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800203 deps = [
204 "//aos:die",
John Park65170ac2020-01-08 20:15:24 -0800205 "@com_google_absl//absl/base",
Austin Schuh972e47e2018-12-20 17:20:58 -0800206 ],
John Park398c74a2018-10-20 21:17:39 -0700207)
208
209cc_test(
210 name = "complex_thread_local_test",
211 srcs = [
212 "complex_thread_local_test.cc",
213 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800214 target_compatible_with = ["@platforms//os:linux"],
John Park398c74a2018-10-20 21:17:39 -0700215 deps = [
216 ":complex_thread_local",
217 "//aos/logging",
John Park398c74a2018-10-20 21:17:39 -0700218 "//aos/testing:googletest",
219 ],
220)
221
222cc_library(
223 name = "init",
224 srcs = [
225 "init.cc",
226 ],
227 hdrs = [
228 "init.h",
229 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800230 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800231 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700232 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700233 ":realtime",
John Park398c74a2018-10-20 21:17:39 -0700234 "//aos:die",
Austin Schuh972e47e2018-12-20 17:20:58 -0800235 "//aos/logging:implementations",
John Park398c74a2018-10-20 21:17:39 -0700236 ],
John Park398c74a2018-10-20 21:17:39 -0700237)
238
Alex Perrycb7da4b2019-08-28 19:35:56 -0700239cc_library(
240 name = "realtime",
241 srcs = [
242 "realtime.cc",
243 ],
244 hdrs = [
245 "realtime.h",
246 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800247 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700248 visibility = ["//visibility:public"],
249 deps = [
Austin Schuhcc6070c2020-10-10 20:25:56 -0700250 ":thread_local",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700251 "@com_github_google_glog//:glog",
252 ],
253)
254
Austin Schuhcb108412019-10-13 16:09:54 -0700255flatbuffer_cc_library(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700256 name = "configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700257 srcs = ["configuration.fbs"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700258 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800259 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700260 visibility = ["//visibility:public"],
Austin Schuhcb108412019-10-13 16:09:54 -0700261)
262
Alex Perryd5e13572020-02-22 15:15:08 -0800263flatbuffer_ts_library(
264 name = "configuration_ts_fbs",
265 srcs = ["configuration.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800266 target_compatible_with = ["@platforms//os:linux"],
Alex Perryd5e13572020-02-22 15:15:08 -0800267 visibility = ["//visibility:public"],
268)
269
Brian Silverman28760272020-02-02 13:21:51 -0800270flatbuffer_py_library(
James Kuszmaul7daef362019-12-31 18:28:17 -0800271 name = "configuration_fbs_python",
272 srcs = ["configuration.fbs"],
273 namespace = "aos",
274 tables = [
275 "Configuration",
276 "Channel",
James Kuszmaul84ff3e52020-01-03 19:48:53 -0800277 "Connection",
James Kuszmaul7daef362019-12-31 18:28:17 -0800278 "Map",
279 "Node",
280 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800281 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul7daef362019-12-31 18:28:17 -0800282 visibility = ["//visibility:public"],
283)
284
John Park398c74a2018-10-20 21:17:39 -0700285cc_library(
286 name = "configuration",
287 srcs = [
288 "configuration.cc",
289 ],
290 hdrs = [
291 "configuration.h",
292 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800293 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh972e47e2018-12-20 17:20:58 -0800294 visibility = ["//visibility:public"],
John Park398c74a2018-10-20 21:17:39 -0700295 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700296 ":configuration_fbs",
Austin Schuhcb108412019-10-13 16:09:54 -0700297 ":flatbuffer_merge",
298 ":flatbuffers",
299 ":json_to_flatbuffer",
John Park398c74a2018-10-20 21:17:39 -0700300 "//aos:unique_malloc_ptr",
Austin Schuh217a9782019-12-21 23:02:50 -0800301 "//aos/network:team_number",
Austin Schuhcb108412019-10-13 16:09:54 -0700302 "//aos/util:file",
303 "@com_github_google_glog//:glog",
304 "@com_google_absl//absl/container:btree",
305 "@com_google_absl//absl/strings",
John Park398c74a2018-10-20 21:17:39 -0700306 ],
John Park398c74a2018-10-20 21:17:39 -0700307)
308
Brian Silvermanf819b442019-01-20 16:51:04 -0800309cc_library(
310 name = "make_unique",
311 hdrs = [
312 "make_unique.h",
313 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800314 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf819b442019-01-20 16:51:04 -0800315 visibility = ["//visibility:public"],
316)
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700317
James Kuszmaulabb77132020-08-01 19:56:16 -0700318flatbuffer_ts_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800319 name = "json_to_flatbuffer_fbs_ts",
James Kuszmaulabb77132020-08-01 19:56:16 -0700320 srcs = ["json_to_flatbuffer.fbs"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800321 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700322 visibility = ["//aos:__subpackages__"],
323)
324
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700325flatbuffer_cc_library(
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800326 name = "json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700327 srcs = ["json_to_flatbuffer.fbs"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800328 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800329 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaulabb77132020-08-01 19:56:16 -0700330 visibility = ["//aos:__subpackages__"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700331)
332
333cc_library(
Austin Schuh43c6a352019-09-30 22:22:10 -0700334 name = "flatbuffer_utils",
335 srcs = ["flatbuffer_utils.cc"],
336 hdrs = ["flatbuffer_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800337 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh43c6a352019-09-30 22:22:10 -0700338 deps = [
339 "@com_github_google_flatbuffers//:flatbuffers",
Brian Silvermancf4fb662021-02-10 17:54:53 -0800340 "@com_github_google_glog//:glog",
Austin Schuh43c6a352019-09-30 22:22:10 -0700341 ],
342)
343
344cc_library(
Austin Schuhd7e252d2019-10-06 13:51:02 -0700345 name = "json_tokenizer",
346 srcs = ["json_tokenizer.cc"],
347 hdrs = ["json_tokenizer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800348 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhd7e252d2019-10-06 13:51:02 -0700349 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700350 "@com_github_google_glog//:glog",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700351 "@com_google_absl//absl/strings",
352 ],
353)
354
355cc_library(
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700356 name = "json_to_flatbuffer",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800357 srcs = [
358 "flatbuffer_introspection.cc",
359 "json_to_flatbuffer.cc",
360 ],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700361 hdrs = ["json_to_flatbuffer.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800362 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700363 visibility = ["//visibility:public"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700364 deps = [
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700365 ":fast_string_builder",
Austin Schuh43c6a352019-09-30 22:22:10 -0700366 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700367 ":flatbuffers",
Austin Schuhd7e252d2019-10-06 13:51:02 -0700368 ":json_tokenizer",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700369 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuhe93d8642019-10-13 15:27:07 -0700370 "@com_github_google_glog//:glog",
Austin Schuhd339a9b2019-10-05 21:33:32 -0700371 "@com_google_absl//absl/strings",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700372 ],
373)
374
375cc_test(
376 name = "json_to_flatbuffer_test",
377 srcs = [
378 "json_to_flatbuffer_test.cc",
379 ],
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800380 data = [
381 ":json_to_flatbuffer_fbs_reflection_out",
382 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800383 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700384 deps = [
385 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800386 ":json_to_flatbuffer_fbs",
Austin Schuh3e95e5d2019-09-20 00:08:54 -0700387 "//aos/testing:googletest",
388 ],
389)
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700390
Tyler Chatow5e369a42019-11-23 11:57:31 -0800391cc_test(
392 name = "flatbuffer_introspection_test",
393 srcs = [
394 "flatbuffer_introspection_test.cc",
395 ],
396 data = [
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800397 ":json_to_flatbuffer_fbs_reflection_out",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800398 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800399 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800400 deps = [
401 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800402 ":json_to_flatbuffer_fbs",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800403 "//aos/testing:googletest",
404 "//aos/util:file",
405 "@com_github_google_flatbuffers//:flatbuffers",
406 ],
407)
408
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700409cc_library(
410 name = "flatbuffer_merge",
411 srcs = ["flatbuffer_merge.cc"],
412 hdrs = ["flatbuffer_merge.h"],
413 copts = ["-Wno-cast-align"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800414 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700415 visibility = ["//visibility:public"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700416 deps = [
417 ":flatbuffer_utils",
Austin Schuhe93d8642019-10-13 15:27:07 -0700418 ":flatbuffers",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700419 "@com_github_google_flatbuffers//:flatbuffers",
420 ],
421)
422
423cc_test(
424 name = "flatbuffer_merge_test",
425 srcs = [
426 "flatbuffer_merge_test.cc",
427 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800428 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700429 deps = [
430 ":flatbuffer_merge",
431 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800432 ":json_to_flatbuffer_fbs",
Austin Schuh09d7ffa2019-10-03 23:43:34 -0700433 "//aos/testing:googletest",
434 ],
435)
Austin Schuhe93d8642019-10-13 15:27:07 -0700436
437cc_library(
438 name = "flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700439 srcs = [
440 "flatbuffers.cc",
441 ],
Austin Schuhe93d8642019-10-13 15:27:07 -0700442 hdrs = [
443 "flatbuffers.h",
444 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800445 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh40485ed2019-10-26 21:51:44 -0700446 visibility = ["//visibility:public"],
Austin Schuhe93d8642019-10-13 15:27:07 -0700447 deps = [
James Kuszmaulad8a8082020-02-14 21:21:58 -0800448 "//aos:macros",
Brian Silverman354697a2020-09-22 21:06:32 -0700449 "//aos/containers:resizeable_buffer",
Austin Schuhe93d8642019-10-13 15:27:07 -0700450 "@com_github_google_flatbuffers//:flatbuffers",
Austin Schuh40485ed2019-10-26 21:51:44 -0700451 "@com_github_google_glog//:glog",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700452 "@com_google_absl//absl/strings",
Austin Schuh6f3babe2020-01-26 20:34:50 -0800453 "@com_google_absl//absl/types:span",
Austin Schuhe93d8642019-10-13 15:27:07 -0700454 ],
455)
Austin Schuhcb108412019-10-13 16:09:54 -0700456
457cc_test(
458 name = "configuration_test",
459 srcs = [
460 "configuration_test.cc",
461 ],
462 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700463 "//aos/events:pingpong_config",
Austin Schuh6b9c4152019-11-29 12:45:24 -0800464 "//aos/events:pong.bfbs",
James Kuszmaulc0c08da2020-05-10 18:56:07 -0700465 "//aos/testdata:test_configs",
Austin Schuhcb108412019-10-13 16:09:54 -0700466 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800467 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhcb108412019-10-13 16:09:54 -0700468 deps = [
469 ":configuration",
Austin Schuh1ef01ef2021-02-07 20:40:36 -0800470 "//aos/testing:flatbuffer_eq",
Austin Schuhcb108412019-10-13 16:09:54 -0700471 "//aos/testing:googletest",
472 "//aos/testing:test_logging",
473 ],
474)
Alex Perrycb7da4b2019-08-28 19:35:56 -0700475
476cc_binary(
477 name = "config_flattener",
478 srcs = [
479 "config_flattener.cc",
480 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800481 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700482 visibility = ["//visibility:public"],
483 deps = [
484 ":configuration",
485 ":init",
486 "//aos/util:file",
487 "@com_github_google_glog//:glog",
488 ],
489)
Tyler Chatow5e369a42019-11-23 11:57:31 -0800490
491cc_binary(
Austin Schuh944df342019-12-21 17:08:55 -0800492 name = "aos_dump",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800493 srcs = [
Austin Schuh944df342019-12-21 17:08:55 -0800494 "aos_dump.cc",
Tyler Chatow5e369a42019-11-23 11:57:31 -0800495 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800496 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow5e369a42019-11-23 11:57:31 -0800497 visibility = ["//visibility:public"],
498 deps = [
499 ":configuration",
500 ":json_to_flatbuffer",
501 "//aos:init",
502 "//aos/events:shm_event_loop",
503 "@com_github_google_glog//:glog",
504 ],
505)
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500506
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700507cc_binary(
508 name = "aos_graph_nodes",
509 srcs = [
510 "aos_graph_nodes.cc",
511 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800512 target_compatible_with = ["@platforms//os:linux"],
Jim Ostrowski17ce54d2020-10-24 17:24:01 -0700513 visibility = ["//visibility:public"],
514 deps = [
515 ":configuration",
516 ":json_to_flatbuffer",
517 "//aos:init",
518 "//aos/events:shm_event_loop",
519 "@com_github_google_glog//:glog",
520 ],
521)
522
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500523cc_library(
524 name = "ftrace",
525 srcs = [
526 "ftrace.cc",
527 ],
528 hdrs = [
529 "ftrace.h",
530 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800531 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman79ec7fc2020-06-08 20:11:22 -0500532 visibility = ["//visibility:public"],
533 deps = [
534 "@com_github_google_glog//:glog",
535 ],
536)
Tyler Chatowfcf16f42020-07-26 12:41:36 -0700537
538cc_library(
539 name = "fast_string_builder",
540 srcs = [
541 "fast_string_builder.cc",
542 ],
543 hdrs = [
544 "fast_string_builder.h",
545 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800546 target_compatible_with = ["@platforms//os:linux"],
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 = [
571 ":realtime",
572 "//aos/testing:googletest",
573 ],
574)
Austin Schuh977a5ed2020-12-02 23:20:04 -0800575
576cc_test(
577 name = "flatbuffers_test",
578 srcs = [
579 "flatbuffers_test.cc",
580 ],
581 deps = [
582 ":flatbuffers",
583 ":json_to_flatbuffer",
Brian Silvermanc5105ab2021-02-10 17:55:38 -0800584 ":json_to_flatbuffer_fbs",
Austin Schuh977a5ed2020-12-02 23:20:04 -0800585 "//aos/testing:googletest",
586 ],
587)
Austin Schuh0de30f32020-12-06 12:44:28 -0800588
589py_binary(
590 name = "flatbuffers_static",
591 srcs = ["flatbuffers_static.py"],
592 visibility = ["//visibility:public"],
593)