mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-13 00:04:29 +00:00
* initial hack to get new Lua generator into flatc * Starting to output enum defs for Lua * Continue to work on table generation for Lua * Finished basic getter access for Lua * Added ability to get object by index * Finished struct builder * aliased reflection to r * finish table builder generation * register requiring files * better generated header info * Tying up loose ends * Updated reflection to handle struct padding * Addd type sizes to reflection * Fixed some vector indirect issues * Lua tests passed * Misc cleanup * ci fixes 1 * ci fixes 2 * renaming * up size of type sizes * manually ran clang-format-11 -i src/idl_parser.cpp * fixed some windows casting * remove stupid auto import * more static_casting * remove std * update other build environments * remove scoped enums * replaced std::to_string with NumToString * more win fixes * more win fixes * replaced old lua with new * removed auto import * review responses * more style fixes * refactor bfbs_gen_len to use code += * added consts * fix lambda capture for windows * remove unused return type
93 lines
2.3 KiB
Python
93 lines
2.3 KiB
Python
# @unused
|
|
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
|
|
|
package(
|
|
default_visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# Public flatc library to compile flatbuffer files at runtime.
|
|
cc_library(
|
|
name = "flatbuffers",
|
|
srcs = [
|
|
"code_generators.cpp",
|
|
"idl_gen_fbs.cpp",
|
|
"idl_gen_text.cpp",
|
|
"idl_parser.cpp",
|
|
"reflection.cpp",
|
|
"util.cpp",
|
|
],
|
|
hdrs = ["//:public_headers"],
|
|
linkopts = select({
|
|
# TODO: Bazel uses `clang` instead of `clang++` to link
|
|
# C++ code on BSD. Temporarily adding these linker flags while
|
|
# we wait for Bazel to resolve
|
|
# https://github.com/bazelbuild/bazel/issues/12023.
|
|
"//:platform_freebsd": ["-lm"],
|
|
"//:platform_openbsd": ["-lm"],
|
|
"//conditions:default": [],
|
|
}),
|
|
strip_include_prefix = "/include",
|
|
visibility = ["//:__pkg__"],
|
|
)
|
|
|
|
# Public flatc compiler library.
|
|
cc_library(
|
|
name = "flatc_library",
|
|
srcs = [
|
|
"bfbs_gen.h",
|
|
"bfbs_gen_lua.cpp",
|
|
"bfbs_gen_lua.h",
|
|
"flatc.cpp",
|
|
],
|
|
hdrs = [
|
|
"//:flatc_headers",
|
|
],
|
|
strip_include_prefix = "/include",
|
|
visibility = ["//:__pkg__"],
|
|
deps = [
|
|
":flatbuffers",
|
|
],
|
|
)
|
|
|
|
# Public flatc compiler.
|
|
cc_library(
|
|
name = "flatc",
|
|
srcs = [
|
|
"bfbs_gen.h",
|
|
"bfbs_gen_lua.cpp",
|
|
"bfbs_gen_lua.h",
|
|
"flatc_main.cpp",
|
|
"idl_gen_cpp.cpp",
|
|
"idl_gen_csharp.cpp",
|
|
"idl_gen_dart.cpp",
|
|
"idl_gen_go.cpp",
|
|
"idl_gen_grpc.cpp",
|
|
"idl_gen_java.cpp",
|
|
"idl_gen_json_schema.cpp",
|
|
"idl_gen_kotlin.cpp",
|
|
"idl_gen_lobster.cpp",
|
|
"idl_gen_lua.cpp",
|
|
"idl_gen_php.cpp",
|
|
"idl_gen_python.cpp",
|
|
"idl_gen_rust.cpp",
|
|
"idl_gen_swift.cpp",
|
|
"idl_gen_text.cpp",
|
|
"idl_gen_ts.cpp",
|
|
"util.cpp",
|
|
],
|
|
hdrs = [
|
|
"//:flatc_headers",
|
|
],
|
|
strip_include_prefix = "/include",
|
|
visibility = ["//:__pkg__"],
|
|
deps = [
|
|
":flatc_library",
|
|
"//grpc/src/compiler:cpp_generator",
|
|
"//grpc/src/compiler:go_generator",
|
|
"//grpc/src/compiler:java_generator",
|
|
"//grpc/src/compiler:python_generator",
|
|
"//grpc/src/compiler:swift_generator",
|
|
"//grpc/src/compiler:ts_generator",
|
|
],
|
|
)
|