Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: third_party/protobuf/BUILD

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/.travis.yml ('k') | third_party/protobuf/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/BUILD
diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD
index cf5f0a8742c0b877ecf5a6e874d081b5afa65fe1..8b1046b90d5c9014f594943c0ed36866c4db6afe 100644
--- a/third_party/protobuf/BUILD
+++ b/third_party/protobuf/BUILD
@@ -2,8 +2,6 @@
licenses(["notice"])
-exports_files(["LICENSE"])
-
################################################################################
# Protobuf Runtime Library
################################################################################
@@ -14,7 +12,7 @@ COPTS = [
"-Wwrite-strings",
"-Woverloaded-virtual",
"-Wno-sign-compare",
- "-Wno-unused-function",
+ "-Wno-error=unused-function",
]
config_setting(
@@ -34,7 +32,6 @@ load(
"protobuf",
"cc_proto_library",
"py_proto_library",
- "internal_copied_filegroup",
"internal_gen_well_known_protos_java",
"internal_protobuf_py_tests",
)
@@ -227,24 +224,6 @@ cc_proto_library(
# Protocol Buffers Compiler
################################################################################
-cc_binary(
- name = "js_embed",
- srcs = ["src/google/protobuf/compiler/js/embed.cc"],
- visibility = ["//visibility:public"],
-)
-
-genrule(
- name = "generate_js_well_known_types_embed",
- srcs = [
- "src/google/protobuf/compiler/js/well_known_types/any.js",
- "src/google/protobuf/compiler/js/well_known_types/struct.js",
- "src/google/protobuf/compiler/js/well_known_types/timestamp.js",
- ],
- outs = ["src/google/protobuf/compiler/js/well_known_types_embed.cc"],
- cmd = "$(location :js_embed) $(SRCS) > $@",
- tools = [":js_embed"],
-)
-
cc_library(
name = "protoc_lib",
srcs = [
@@ -322,7 +301,6 @@ cc_library(
"src/google/protobuf/compiler/javanano/javanano_message_field.cc",
"src/google/protobuf/compiler/javanano/javanano_primitive_field.cc",
"src/google/protobuf/compiler/js/js_generator.cc",
- "src/google/protobuf/compiler/js/well_known_types_embed.cc",
"src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
"src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
"src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
@@ -335,7 +313,6 @@ cc_library(
"src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
"src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
"src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
- "src/google/protobuf/compiler/php/php_generator.cc",
"src/google/protobuf/compiler/plugin.cc",
"src/google/protobuf/compiler/plugin.pb.cc",
"src/google/protobuf/compiler/python/python_generator.cc",
@@ -410,10 +387,8 @@ RELATIVE_TEST_PROTOS = [
"google/protobuf/util/internal/testdata/field_mask.proto",
"google/protobuf/util/internal/testdata/maps.proto",
"google/protobuf/util/internal/testdata/oneofs.proto",
- "google/protobuf/util/internal/testdata/proto3.proto",
"google/protobuf/util/internal/testdata/struct.proto",
"google/protobuf/util/internal/testdata/timestamp_duration.proto",
- "google/protobuf/util/internal/testdata/wrappers.proto",
"google/protobuf/util/json_format_proto3.proto",
"google/protobuf/util/message_differencer_unittest.proto",
]
@@ -585,8 +560,6 @@ py_library(
"python/google/protobuf/**/*.py",
],
exclude = [
- "python/google/protobuf/__init__.py",
- "python/google/protobuf/**/__init__.py",
"python/google/protobuf/internal/*_test.py",
"python/google/protobuf/internal/test_util.py",
],
@@ -596,7 +569,7 @@ py_library(
)
cc_binary(
- name = "python/google/protobuf/internal/_api_implementation.so",
+ name = "internal/_api_implementation.so",
srcs = ["python/google/protobuf/internal/api_implementation.cc"],
copts = COPTS + [
"-DPYTHON_PROTO2_CPP_IMPL_V2",
@@ -610,7 +583,7 @@ cc_binary(
)
cc_binary(
- name = "python/google/protobuf/pyext/_message.so",
+ name = "pyext/_message.so",
srcs = glob([
"python/google/protobuf/pyext/*.cc",
"python/google/protobuf/pyext/*.h",
@@ -649,31 +622,15 @@ config_setting(
},
)
-# Copy the builtin proto files from src/google/protobuf to
-# python/google/protobuf. This way, the generated Python sources will be in the
-# same directory as the Python runtime sources. This is necessary for the
-# modules to be imported correctly since they are all part of the same Python
-# package.
-internal_copied_filegroup(
- name = "protos_python",
- srcs = WELL_KNOWN_PROTOS,
- strip_prefix = "src",
- dest = "python",
-)
-
-# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
-# which case we can simply add :protos_python in srcs.
-COPIED_WELL_KNOWN_PROTOS = ["python/" + s for s in RELATIVE_WELL_KNOWN_PROTOS]
-
py_proto_library(
name = "protobuf_python",
- srcs = COPIED_WELL_KNOWN_PROTOS,
- include = "python",
+ srcs = WELL_KNOWN_PROTOS,
+ include = "src",
data = select({
"//conditions:default": [],
":use_fast_cpp_protos": [
- ":python/google/protobuf/internal/_api_implementation.so",
- ":python/google/protobuf/pyext/_message.so",
+ ":internal/_api_implementation.so",
+ ":pyext/_message.so",
],
}),
default_runtime = "",
@@ -686,27 +643,10 @@ py_proto_library(
visibility = ["//visibility:public"],
)
-# Copy the test proto files from src/google/protobuf to
-# python/google/protobuf. This way, the generated Python sources will be in the
-# same directory as the Python runtime sources. This is necessary for the
-# modules to be imported correctly by the tests since they are all part of the
-# same Python package.
-internal_copied_filegroup(
- name = "protos_python_test",
- srcs = LITE_TEST_PROTOS + TEST_PROTOS,
- strip_prefix = "src",
- dest = "python",
-)
-
-# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
-# which case we can simply add :protos_python_test in srcs.
-COPIED_LITE_TEST_PROTOS = ["python/" + s for s in RELATIVE_LITE_TEST_PROTOS]
-COPIED_TEST_PROTOS = ["python/" + s for s in RELATIVE_TEST_PROTOS]
-
py_proto_library(
name = "python_common_test_protos",
- srcs = COPIED_LITE_TEST_PROTOS + COPIED_TEST_PROTOS,
- include = "python",
+ srcs = LITE_TEST_PROTOS + TEST_PROTOS,
+ include = "src",
default_runtime = "",
protoc = ":protoc",
srcs_version = "PY2AND3",
@@ -732,7 +672,6 @@ py_library(
[
"python/google/protobuf/internal/*_test.py",
"python/google/protobuf/internal/test_util.py",
- "python/google/protobuf/internal/import_test_package/__init__.py",
],
),
imports = ["python"],
@@ -768,10 +707,3 @@ internal_protobuf_py_tests(
],
deps = [":python_tests"],
)
-
-proto_lang_toolchain(
- name = "cc_toolchain",
- runtime = ":protobuf",
- command_line = "--cpp_out=$(OUT)",
- visibility = ["//visibility:public"],
-)
« no previous file with comments | « third_party/protobuf/.travis.yml ('k') | third_party/protobuf/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698