ADD: added new version of protobuf

This commit is contained in:
Henry Winkel
2022-12-20 10:09:28 +01:00
parent 4a79559129
commit 1e2b3dda7b
1513 changed files with 123720 additions and 83381 deletions

View File

@@ -7,7 +7,7 @@ load(
"strip_prefix",
)
load("//:protobuf_release.bzl", "package_naming")
load(":build_systems.bzl", "gen_file_lists")
load(":build_systems.bzl", "gen_automake_file_lists", "gen_file_lists")
load(":cc_dist_library.bzl", "cc_dist_library")
package_naming(
@@ -17,8 +17,17 @@ package_naming(
pkg_files(
name = "wkt_protos_files",
srcs = [
"//:well_known_type_protos",
"//src/google/protobuf:descriptor_proto_srcs",
"//:src/google/protobuf/any.proto",
"//:src/google/protobuf/api.proto",
"//:src/google/protobuf/descriptor.proto",
"//:src/google/protobuf/duration.proto",
"//:src/google/protobuf/empty.proto",
"//:src/google/protobuf/field_mask.proto",
"//:src/google/protobuf/source_context.proto",
"//:src/google/protobuf/struct.proto",
"//:src/google/protobuf/timestamp.proto",
"//:src/google/protobuf/type.proto",
"//:src/google/protobuf/wrappers.proto",
],
prefix = "include/google/protobuf",
visibility = ["//visibility:private"],
@@ -26,9 +35,7 @@ pkg_files(
pkg_files(
name = "compiler_plugin_protos_files",
srcs = [
"//src/google/protobuf/compiler:compiler_plugin_protos_files",
],
srcs = ["//:src/google/protobuf/compiler/plugin.proto"],
prefix = "include/google/protobuf/compiler",
visibility = ["//visibility:private"],
)
@@ -88,10 +95,10 @@ pkg_filegroup(
srcs = [
":dist_files",
"//:common_dist_files",
"//:cpp_dist_files", # to build protoc
"//benchmarks:all_dist_files",
"//build_defs:dist_files",
"//conformance:all_dist_files",
"//src:all_dist_files",
"//third_party/utf8_range:dist_files",
"@com_google_protobuf_examples//:dist_files",
],
)
@@ -100,7 +107,7 @@ pkg_filegroup(
name = "cpp_srcs",
srcs = [
":dist_common",
"//src:all_dist_files",
"//:cpp_dist_files",
],
)
@@ -222,7 +229,7 @@ pkg_filegroup(
name = "python_srcs",
srcs = [
":dist_common",
"//python:dist_files",
"//:python_dist_files",
],
)
@@ -304,31 +311,30 @@ gen_file_lists(
testonly = 1,
out_stem = "src_file_lists",
src_libs = {
# {[source rule]: [name in generated file]}
# Libraries:
":protobuf": "libprotobuf",
":protobuf_lite": "libprotobuf_lite",
":protoc": "libprotoc",
# Protos:
"//src/google/protobuf:well_known_type_protos": "wkt_protos",
"//src/google/protobuf:descriptor_proto": "descriptor_proto",
"//src/google/protobuf/compiler:plugin_proto": "plugin_proto",
# Test libraries:
":common_test": "common_test",
":lite_test_util": "lite_test_util",
":test_util": "test_util",
# Tests and test-only protos:
"//src/google/protobuf:full_test_srcs": "protobuf_test",
"//src/google/protobuf:test_proto_srcs": "protobuf_test_protos",
"//src/google/protobuf:lite_test_srcs": "protobuf_lite_test",
"//src/google/protobuf:lite_test_proto_srcs": "protobuf_lite_test_protos",
"//src/google/protobuf/compiler:test_srcs": "compiler_test",
"//src/google/protobuf/compiler:test_proto_srcs": "compiler_test_protos",
"//src/google/protobuf/compiler:test_plugin_srcs": "test_plugin",
"//src/google/protobuf/io:test_srcs": "io_test",
"//src/google/protobuf/util:test_srcs": "util_test",
"//src/google/protobuf/util:test_proto_srcs": "util_test_protos",
"//src/google/protobuf/stubs:test_srcs": "stubs_test",
# source rule: name in generated file
"//:protobuf": "libprotobuf",
"//:protoc_lib": "libprotoc",
"//:protobuf_lite": "libprotobuf_lite",
},
)
gen_automake_file_lists(
name = "gen_automake_extra_dist_lists",
testonly = 1,
out = "extra_dist_file_lists.am",
src_libs = {
# source rule: name in generated file
"//:common_dist_files": "dist_common",
"//conformance:dist_files": "dist_conformance",
"//benchmarks:all_dist_files": "dist_benchmark",
"@com_google_protobuf_examples//:dist_files": "dist_example",
"//:csharp_dist_files": "dist_csharp",
"//csharp:dist_files": "dist_csharp2",
"//:objectivec_dist_files": "dist_objectivec",
"//objectivec:dist_files": "dist_objectivec2",
"//php:dist_files": "dist_php",
"//:python_dist_files": "dist_python",
"//ruby:dist_files": "dist_ruby",
},
)
@@ -342,17 +348,8 @@ cc_dist_library(
"//build_defs:config_msvc": [],
"//conditions:default": ["-lpthread"],
}),
tags = ["manual"],
deps = [
"//src/google/protobuf:arena",
"//src/google/protobuf:arena_align",
"//src/google/protobuf:arena_allocation_policy",
"//src/google/protobuf:arena_cleanup",
"//src/google/protobuf:arena_config",
"//src/google/protobuf:protobuf_lite",
"//src/google/protobuf/io",
"//src/google/protobuf/io:io_win32",
"//src/google/protobuf/stubs:lite",
"//:protobuf_lite",
],
)
@@ -365,99 +362,12 @@ cc_dist_library(
"-lpthread",
],
}),
tags = ["manual"],
deps = [
"//src/google/protobuf:wkt_cc_proto",
"//src/google/protobuf:protobuf_nowkt",
"//src/google/protobuf:arena",
"//src/google/protobuf:arena_align",
"//src/google/protobuf:arena_allocation_policy",
"//src/google/protobuf:arena_cleanup",
"//src/google/protobuf:arena_config",
"//src/google/protobuf:protobuf_lite",
"//src/google/protobuf:port_def",
"//src/google/protobuf/compiler:importer",
"//src/google/protobuf/io",
"//src/google/protobuf/io:gzip_stream",
"//src/google/protobuf/io:io_win32",
"//src/google/protobuf/io:printer",
"//src/google/protobuf/io:tokenizer",
"//src/google/protobuf/io:zero_copy_sink",
"//src/google/protobuf/json",
"//src/google/protobuf/json:descriptor_traits",
"//src/google/protobuf/json:lexer",
"//src/google/protobuf/json:message_path",
"//src/google/protobuf/json:parser",
"//src/google/protobuf/json:unparser",
"//src/google/protobuf/json:untyped_message",
"//src/google/protobuf/json:writer",
"//src/google/protobuf/json:zero_copy_buffered_stream",
"//src/google/protobuf/stubs",
"//src/google/protobuf/stubs:lite",
"//src/google/protobuf/util:delimited_message_util",
"//src/google/protobuf/util:differencer",
"//src/google/protobuf/util:field_mask_util",
"//src/google/protobuf/util:json_util",
"//src/google/protobuf/util:time_util",
"//src/google/protobuf/util:type_resolver_util",
"//:protobuf",
"//:protobuf_lite",
],
)
cc_dist_library(
name = "protoc",
tags = ["manual"],
deps = [
"//src/google/protobuf/compiler:code_generator",
"//src/google/protobuf/compiler:command_line_interface",
"//src/google/protobuf/compiler/cpp",
"//src/google/protobuf/compiler/cpp:names",
"//src/google/protobuf/compiler/cpp:names_internal",
"//src/google/protobuf/compiler/csharp",
"//src/google/protobuf/compiler/csharp:names",
"//src/google/protobuf/compiler/java",
"//src/google/protobuf/compiler/java:names",
"//src/google/protobuf/compiler/java:names_internal",
"//src/google/protobuf/compiler/objectivec",
"//src/google/protobuf/compiler/objectivec:line_consumer",
"//src/google/protobuf/compiler/objectivec:names",
"//src/google/protobuf/compiler/objectivec:names_internal",
"//src/google/protobuf/compiler/php",
"//src/google/protobuf/compiler/php:names",
"//src/google/protobuf/compiler/python",
"//src/google/protobuf/compiler/ruby",
],
)
cc_dist_library(
name = "lite_test_util",
testonly = 1,
tags = ["manual"],
deps = ["//src/google/protobuf:lite_test_util"],
)
cc_dist_library(
name = "test_util",
testonly = 1,
tags = ["manual"],
deps = [
"//src/google/protobuf:test_util",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/compiler:annotation_test_util",
"//src/google/protobuf/compiler/cpp:unittest_lib",
],
)
cc_dist_library(
name = "common_test",
testonly = 1,
tags = ["manual"],
deps = [
"//src/google/protobuf/testing",
"//src/google/protobuf/compiler:mock_code_generator",
],
)
################################################################################
# Distribution sources
################################################################################