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

Unified Diff: third_party/protobuf/BUILD.gn

Issue 2866183003: Syntax and coverage checking added to Network Traffic Annotations. (Closed)
Patch Set: Protobuf build updated. Created 3 years, 7 months 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 | « net/url_request/url_request_context.cc ('k') | tools/traffic_annotation/auditor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/BUILD.gn
diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn
index 30c840874df57618f6ddb7b7809b5114b96035e3..c252cb87f1c46d4eedb1c0b8fc55593ae57d0d63 100644
--- a/third_party/protobuf/BUILD.gn
+++ b/third_party/protobuf/BUILD.gn
@@ -41,6 +41,47 @@ protobuf_globals_sources = [
"src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
]
+text_format_sources = [
+ "src/google/protobuf/any.cc",
+ "src/google/protobuf/any.h",
+ "src/google/protobuf/any.pb.cc",
+ "src/google/protobuf/any.pb.h",
+ "src/google/protobuf/dynamic_message.cc",
+ "src/google/protobuf/dynamic_message.h",
+ "src/google/protobuf/extension_set_heavy.cc",
+ "src/google/protobuf/io/printer.cc",
+ "src/google/protobuf/io/printer.h",
+ "src/google/protobuf/io/strtod.cc",
+ "src/google/protobuf/io/strtod.h",
+ "src/google/protobuf/io/tokenizer.cc",
+ "src/google/protobuf/io/tokenizer.h",
+ "src/google/protobuf/io/zero_copy_stream_impl.cc",
+ "src/google/protobuf/io/zero_copy_stream_impl.h",
+ "src/google/protobuf/descriptor.cc",
+ "src/google/protobuf/descriptor.h",
+ "src/google/protobuf/descriptor.pb.cc",
+ "src/google/protobuf/descriptor.pb.h",
+ "src/google/protobuf/descriptor_database.cc",
+ "src/google/protobuf/descriptor_database.h",
+ "src/google/protobuf/generated_message_reflection.cc",
+ "src/google/protobuf/generated_message_reflection.h",
+ "src/google/protobuf/map_field.cc",
+ "src/google/protobuf/map_field.h",
+ "src/google/protobuf/map_field_inl.h",
+ "src/google/protobuf/message.cc",
+ "src/google/protobuf/message.h",
+ "src/google/protobuf/reflection_ops.cc",
+ "src/google/protobuf/reflection_ops.h",
+ "src/google/protobuf/stubs/substitute.cc",
+ "src/google/protobuf/stubs/substitute.h",
+ "src/google/protobuf/text_format.cc",
+ "src/google/protobuf/text_format.h",
+ "src/google/protobuf/unknown_field_set.cc",
+ "src/google/protobuf/unknown_field_set.h",
+ "src/google/protobuf/wire_format.cc",
+ "src/google/protobuf/wire_format.h",
+]
+
protobuf_lite_sources = [
"src/google/protobuf/arena.cc",
"src/google/protobuf/arena.h",
@@ -124,6 +165,11 @@ protobuf_lite_sources = [
"src/google/protobuf/wire_format_lite_inl.h",
]
+if (is_debug || dchecks_always_on) {
+ protobuf_lite_sources += text_format_sources
+ text_format_sources = []
+}
+
protobuf_lite_cflags = []
if (is_win) {
protobuf_lite_cflags = [
@@ -226,38 +272,28 @@ static_library("protobuf_full") {
# The traffic_annotation tool is not part of Chrome itself, and needs to
# parse human-readable protobufs.
"//tools/traffic_annotation/*",
+
+ # The traffic_annotation in Chrome is only linked when DCHECKS are on. It
+ # needs to parse human-readable protobufs to check their syntax.
+ "//chrome/browser/net/traffic_annotation/*",
]
- sources = protobuf_lite_sources + protobuf_globals_sources + [
- "src/google/protobuf/any.cc",
- "src/google/protobuf/any.h",
- "src/google/protobuf/any.pb.cc",
- "src/google/protobuf/any.pb.h",
+ sources = protobuf_lite_sources + protobuf_globals_sources +
+ text_format_sources + [
"src/google/protobuf/api.pb.cc",
"src/google/protobuf/api.pb.h",
"src/google/protobuf/compiler/importer.cc",
"src/google/protobuf/compiler/importer.h",
"src/google/protobuf/compiler/parser.cc",
"src/google/protobuf/compiler/parser.h",
- "src/google/protobuf/descriptor.cc",
- "src/google/protobuf/descriptor.h",
- "src/google/protobuf/descriptor.pb.cc",
- "src/google/protobuf/descriptor.pb.h",
- "src/google/protobuf/descriptor_database.cc",
- "src/google/protobuf/descriptor_database.h",
"src/google/protobuf/duration.pb.cc",
"src/google/protobuf/duration.pb.h",
- "src/google/protobuf/dynamic_message.cc",
- "src/google/protobuf/dynamic_message.h",
"src/google/protobuf/empty.pb.cc",
"src/google/protobuf/empty.pb.h",
- "src/google/protobuf/extension_set_heavy.cc",
"src/google/protobuf/field_mask.pb.cc",
"src/google/protobuf/field_mask.pb.h",
"src/google/protobuf/generated_enum_reflection.h",
"src/google/protobuf/generated_enum_util.h",
- "src/google/protobuf/generated_message_reflection.cc",
- "src/google/protobuf/generated_message_reflection.h",
# gzip_stream.cc pulls in zlib, but it's not actually used by protoc, just
# by test code, so instead of compiling zlib for the host, let's just
@@ -265,25 +301,10 @@ static_library("protobuf_full") {
# "src/google/protobuf/io/gzip_stream.cc",
# "src/google/protobuf/io/gzip_stream.h",
- "src/google/protobuf/io/printer.cc",
- "src/google/protobuf/io/printer.h",
- "src/google/protobuf/io/strtod.cc",
- "src/google/protobuf/io/strtod.h",
- "src/google/protobuf/io/tokenizer.cc",
- "src/google/protobuf/io/tokenizer.h",
- "src/google/protobuf/io/zero_copy_stream_impl.cc",
- "src/google/protobuf/io/zero_copy_stream_impl.h",
"src/google/protobuf/map_entry.h",
- "src/google/protobuf/map_field.cc",
- "src/google/protobuf/map_field.h",
- "src/google/protobuf/map_field_inl.h",
- "src/google/protobuf/message.cc",
- "src/google/protobuf/message.h",
"src/google/protobuf/metadata.h",
"src/google/protobuf/reflection.h",
"src/google/protobuf/reflection_internal.h",
- "src/google/protobuf/reflection_ops.cc",
- "src/google/protobuf/reflection_ops.h",
"src/google/protobuf/service.cc",
"src/google/protobuf/service.h",
"src/google/protobuf/source_context.pb.cc",
@@ -294,16 +315,10 @@ static_library("protobuf_full") {
"src/google/protobuf/stubs/mathlimits.h",
"src/google/protobuf/stubs/mathutil.h",
"src/google/protobuf/stubs/singleton.h",
- "src/google/protobuf/stubs/substitute.cc",
- "src/google/protobuf/stubs/substitute.h",
- "src/google/protobuf/text_format.cc",
- "src/google/protobuf/text_format.h",
"src/google/protobuf/timestamp.pb.cc",
"src/google/protobuf/timestamp.pb.h",
"src/google/protobuf/type.pb.cc",
"src/google/protobuf/type.pb.h",
- "src/google/protobuf/unknown_field_set.cc",
- "src/google/protobuf/unknown_field_set.h",
"src/google/protobuf/util/field_comparator.cc",
"src/google/protobuf/util/field_comparator.h",
"src/google/protobuf/util/field_mask_util.cc",
@@ -350,12 +365,10 @@ static_library("protobuf_full") {
"src/google/protobuf/util/type_resolver.h",
"src/google/protobuf/util/type_resolver_util.cc",
"src/google/protobuf/util/type_resolver_util.h",
- "src/google/protobuf/wire_format.cc",
- "src/google/protobuf/wire_format.h",
"src/google/protobuf/wrappers.pb.cc",
"src/google/protobuf/wrappers.pb.h",
]
-
+
deps = [
"//build/config/sanitizers:deps",
]
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | tools/traffic_annotation/auditor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698