Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
2.0 KiB
103 lines
2.0 KiB
load( |
|
"//bazel:build_defs.bzl", |
|
"UPB_DEFAULT_COPTS", |
|
"UPB_DEFAULT_CPPOPTS", |
|
) |
|
|
|
cc_library( |
|
name = "mini_descriptor", |
|
srcs = [ |
|
"build_enum.c", |
|
"decode.c", |
|
"link.c", |
|
], |
|
hdrs = [ |
|
"build_enum.h", |
|
"decode.h", |
|
"link.h", |
|
], |
|
copts = UPB_DEFAULT_COPTS, |
|
visibility = ["//visibility:public"], |
|
deps = [ |
|
":internal", |
|
"//upb:base", |
|
"//upb:mem", |
|
"//upb:mini_table", |
|
"//upb:port", |
|
"//upb/base:internal", |
|
"//upb/message:types", |
|
"//upb/mini_table:internal", |
|
], |
|
) |
|
|
|
cc_library( |
|
name = "internal", |
|
srcs = [ |
|
"internal/base92.c", |
|
"internal/encode.c", |
|
], |
|
hdrs = [ |
|
"internal/base92.h", |
|
"internal/decoder.h", |
|
"internal/encode.h", |
|
"internal/encode.hpp", |
|
"internal/modifiers.h", |
|
"internal/wire_constants.h", |
|
], |
|
copts = UPB_DEFAULT_COPTS, |
|
visibility = ["//visibility:public"], |
|
deps = [ |
|
"//upb:base", |
|
"//upb:port", |
|
"//upb/base:internal", |
|
], |
|
) |
|
|
|
cc_test( |
|
name = "encode_test", |
|
srcs = ["internal/encode_test.cc"], |
|
copts = UPB_DEFAULT_CPPOPTS, |
|
deps = [ |
|
":internal", |
|
":mini_descriptor", |
|
"//:protobuf", |
|
"//upb:base", |
|
"//upb:mem", |
|
"//upb:message", |
|
"//upb:mini_table", |
|
"//upb:port", |
|
"//upb:wire", |
|
"//upb/message:internal", |
|
"@com_google_absl//absl/container:flat_hash_set", |
|
"@com_google_googletest//:gtest", |
|
"@com_google_googletest//:gtest_main", |
|
], |
|
) |
|
|
|
# begin:github_only |
|
filegroup( |
|
name = "source_files", |
|
srcs = glob( |
|
[ |
|
"**/*.c", |
|
"**/*.h", |
|
], |
|
), |
|
visibility = [ |
|
"//python/dist:__pkg__", |
|
"//upb/cmake:__pkg__", |
|
], |
|
) |
|
# end:github_only |
|
|
|
# begin:github_only |
|
filegroup( |
|
name = "test_srcs", |
|
srcs = glob( |
|
[ |
|
"**/*test.cc", |
|
], |
|
), |
|
visibility = ["//pkg:__pkg__"], |
|
) |
|
# end:github_only
|
|
|