James Kuszmaul | 1e57af9 | 2023-12-20 15:34:54 -0800 | [diff] [blame] | 1 | load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file") |
| 2 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
| 3 | |
| 4 | copy_file( |
| 5 | name = "reflection_fbs_copy", |
| 6 | src = "@com_github_google_flatbuffers//reflection:reflection_fbs_schema", |
| 7 | out = "reflection.fbs", |
| 8 | ) |
| 9 | |
| 10 | # This autogenerates both a reflection_static.h and a reflection_generated.h. |
| 11 | # However, in order to avoid having two conflicting headers floating around, |
| 12 | # we forcibly override the #include to use flatbuffers/reflection_generated.h |
| 13 | # in static_flatbuffers.cc |
| 14 | static_flatbuffer( |
| 15 | name = "reflection_fbs", |
| 16 | srcs = ["reflection.fbs"], |
| 17 | visibility = ["//visibility:public"], |
| 18 | ) |