1# @unused 2load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") 3 4package( 5 default_visibility = ["//visibility:private"], 6) 7 8# Public flatc library to compile flatbuffer files at runtime. 9cc_library( 10 name = "flatbuffers", 11 srcs = [ 12 "code_generators.cpp", 13 "idl_gen_fbs.cpp", 14 "idl_gen_text.cpp", 15 "idl_parser.cpp", 16 "reflection.cpp", 17 "util.cpp", 18 ], 19 hdrs = ["//:public_headers"], 20 strip_include_prefix = "/include", 21 visibility = ["//:__pkg__"], 22) 23 24# Public flatc compiler library. 25cc_library( 26 name = "flatc_library", 27 srcs = [ 28 "flatc.cpp", 29 ], 30 hdrs = [ 31 "//:flatc_headers", 32 ], 33 strip_include_prefix = "/include", 34 visibility = ["//:__pkg__"], 35 deps = [ 36 ":flatbuffers", 37 ], 38) 39 40# Public flatc compiler. 41cc_library( 42 name = "flatc", 43 srcs = [ 44 "flatc_main.cpp", 45 "idl_gen_cpp.cpp", 46 "idl_gen_csharp.cpp", 47 "idl_gen_dart.cpp", 48 "idl_gen_go.cpp", 49 "idl_gen_grpc.cpp", 50 "idl_gen_java.cpp", 51 "idl_gen_json_schema.cpp", 52 "idl_gen_kotlin.cpp", 53 "idl_gen_lobster.cpp", 54 "idl_gen_lua.cpp", 55 "idl_gen_php.cpp", 56 "idl_gen_python.cpp", 57 "idl_gen_rust.cpp", 58 "idl_gen_swift.cpp", 59 "idl_gen_text.cpp", 60 "idl_gen_ts.cpp", 61 "util.cpp", 62 ], 63 hdrs = [ 64 "//:flatc_headers", 65 ], 66 strip_include_prefix = "/include", 67 visibility = ["//:__pkg__"], 68 deps = [ 69 ":flatc_library", 70 "//grpc/src/compiler:cpp_generator", 71 "//grpc/src/compiler:go_generator", 72 "//grpc/src/compiler:java_generator", 73 "//grpc/src/compiler:python_generator", 74 "//grpc/src/compiler:swift_generator", 75 "//grpc/src/compiler:ts_generator", 76 ], 77) 78