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.
104 lines
2.3 KiB
104 lines
2.3 KiB
2 years ago
|
# Copyright (c) 2009-2021, Google LLC
|
||
|
# All rights reserved.
|
||
|
#
|
||
1 year ago
|
# Use of this source code is governed by a BSD-style
|
||
|
# license that can be found in the LICENSE file or at
|
||
|
# https://developers.google.com/open-source/licenses/bsd
|
||
2 years ago
|
|
||
|
load(
|
||
8 months ago
|
"//upb/bazel:build_defs.bzl",
|
||
2 years ago
|
"UPB_DEFAULT_CPPOPTS",
|
||
|
)
|
||
|
|
||
2 years ago
|
# begin:google_only
|
||
1 year ago
|
# package(default_applicable_licenses = ["//upb:license"])
|
||
2 years ago
|
# end:google_only
|
||
|
|
||
2 years ago
|
licenses(["notice"])
|
||
|
|
||
|
cc_binary(
|
||
|
name = "protoc-gen-upb-protos",
|
||
|
srcs = [
|
||
|
"protoc-gen-upb-protos.cc",
|
||
|
],
|
||
|
copts = UPB_DEFAULT_CPPOPTS,
|
||
|
visibility = ["//visibility:public"],
|
||
|
deps = [
|
||
2 years ago
|
":gen_utils",
|
||
2 years ago
|
":generator",
|
||
2 years ago
|
":names",
|
||
|
":output",
|
||
1 year ago
|
"//:protobuf",
|
||
|
"//src/google/protobuf/compiler:code_generator",
|
||
1 year ago
|
"//upb_generator:file_layout",
|
||
2 years ago
|
],
|
||
|
)
|
||
|
|
||
|
cc_library(
|
||
|
name = "generator",
|
||
|
srcs = [
|
||
|
"gen_accessors.cc",
|
||
|
"gen_enums.cc",
|
||
|
"gen_extensions.cc",
|
||
|
"gen_messages.cc",
|
||
2 years ago
|
"gen_repeated_fields.cc",
|
||
2 years ago
|
],
|
||
|
hdrs = [
|
||
|
"gen_accessors.h",
|
||
|
"gen_enums.h",
|
||
|
"gen_extensions.h",
|
||
|
"gen_messages.h",
|
||
2 years ago
|
"gen_repeated_fields.h",
|
||
2 years ago
|
],
|
||
|
visibility = ["//visibility:private"],
|
||
|
deps = [
|
||
2 years ago
|
":gen_utils",
|
||
|
":names",
|
||
|
":output",
|
||
1 year ago
|
"//:protobuf",
|
||
1 year ago
|
"//upb_generator:common",
|
||
|
"//upb_generator:file_layout",
|
||
|
"//upb_generator:keywords",
|
||
|
"//upb_generator:names",
|
||
11 months ago
|
"@com_google_absl//absl/container:flat_hash_set",
|
||
|
"@com_google_absl//absl/strings",
|
||
2 years ago
|
],
|
||
|
)
|
||
|
|
||
|
cc_library(
|
||
|
name = "output",
|
||
|
srcs = ["output.cc"],
|
||
|
hdrs = ["output.h"],
|
||
|
visibility = ["//visibility:private"],
|
||
|
deps = [
|
||
1 year ago
|
"//:protobuf",
|
||
11 months ago
|
"//src/google/protobuf/io",
|
||
2 years ago
|
"@com_google_absl//absl/log:absl_log",
|
||
2 years ago
|
"@com_google_absl//absl/strings",
|
||
2 years ago
|
],
|
||
|
)
|
||
|
|
||
|
cc_library(
|
||
|
name = "gen_utils",
|
||
|
srcs = ["gen_utils.cc"],
|
||
|
hdrs = ["gen_utils.h"],
|
||
|
visibility = ["//visibility:public"],
|
||
|
deps = [
|
||
1 year ago
|
"//:protobuf",
|
||
|
"//src/google/protobuf/compiler:code_generator",
|
||
2 years ago
|
"@com_google_absl//absl/strings",
|
||
2 years ago
|
],
|
||
|
)
|
||
2 years ago
|
|
||
|
cc_library(
|
||
|
name = "names",
|
||
|
srcs = ["names.cc"],
|
||
|
hdrs = ["names.h"],
|
||
|
visibility = ["//visibility:private"],
|
||
|
deps = [
|
||
|
":output",
|
||
11 months ago
|
"//src/google/protobuf",
|
||
1 year ago
|
"//upb_generator:keywords",
|
||
2 years ago
|
],
|
||
|
)
|