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

Side by Side Diff: third_party/protobuf/BUILD.gn

Issue 1291903002: Pull new version of protobuf sources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix attempts Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/protobuf/BUILD ('k') | third_party/protobuf/CHANGES.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 if (is_win) {
6 config_h_dir = "vsprojects"
7 } else {
8 config_h_dir = "."
9 }
10
11 config("protobuf_config") { 5 config("protobuf_config") {
12 include_dirs = [ 6 include_dirs = [ "src" ]
13 "src",
14 config_h_dir,
15 ]
16 defines = [ 7 defines = [
17 "GOOGLE_PROTOBUF_NO_RTTI", 8 "GOOGLE_PROTOBUF_NO_RTTI",
18 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", 9 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
10 "HAVE_PTHREAD",
19 ] 11 ]
12
13 if (is_mac || (current_toolchain == host_toolchain && host_os == "mac")) {
14 # Chromium builds don't yet support __thread on Mac -- not sure if the
15 # limiting factor is using libc++ or having OS X >=10.7. Remove this once
16 # the above aren't issues.
17 defines += [ "GOOGLE_PROTOBUF_NO_THREADLOCAL" ]
18 }
20 } 19 }
21 20
22 if (is_component_build) { 21 if (is_component_build) {
23 config("protobuf_use_dlls") { 22 config("protobuf_use_dlls") {
24 defines = [ "PROTOBUF_USE_DLLS" ] 23 defines = [ "PROTOBUF_USE_DLLS" ]
25 } 24 }
26 } 25 }
27 26
28 # This config should be applied to targets using generated code from the proto 27 # This config should be applied to targets using generated code from the proto
29 # compiler. It sets up the include directories properly. 28 # compiler. It sets up the include directories properly.
30 config("using_proto") { 29 config("using_proto") {
31 include_dirs = [ 30 include_dirs = [
32 "src", 31 "src",
33 "$root_gen_dir/protoc_out", 32 "$root_gen_dir/protoc_out",
34 ] 33 ]
35 } 34 }
36 35
37 protobuf_lite_sources = [ 36 protobuf_lite_sources = [
37 "src/google/protobuf/arena.cc",
38 "src/google/protobuf/arena.h",
39 "src/google/protobuf/arenastring.cc",
40 "src/google/protobuf/arenastring.h",
41 "src/google/protobuf/descriptor.h",
42 "src/google/protobuf/descriptor.pb.h",
38 "src/google/protobuf/extension_set.cc", 43 "src/google/protobuf/extension_set.cc",
39 "src/google/protobuf/extension_set.h", 44 "src/google/protobuf/extension_set.h",
45 "src/google/protobuf/generated_enum_reflection.h",
46 "src/google/protobuf/generated_enum_util.h",
40 "src/google/protobuf/generated_message_util.cc", 47 "src/google/protobuf/generated_message_util.cc",
41 "src/google/protobuf/generated_message_util.h", 48 "src/google/protobuf/generated_message_util.h",
42 "src/google/protobuf/io/coded_stream.cc", 49 "src/google/protobuf/io/coded_stream.cc",
43 "src/google/protobuf/io/coded_stream.h", 50 "src/google/protobuf/io/coded_stream.h",
44 "src/google/protobuf/io/coded_stream_inl.h", 51 "src/google/protobuf/io/coded_stream_inl.h",
45 "src/google/protobuf/io/zero_copy_stream.cc", 52 "src/google/protobuf/io/zero_copy_stream.cc",
46 "src/google/protobuf/io/zero_copy_stream.h", 53 "src/google/protobuf/io/zero_copy_stream.h",
47 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 54 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
48 "src/google/protobuf/io/zero_copy_stream_impl_lite.h", 55 "src/google/protobuf/io/zero_copy_stream_impl_lite.h",
56 "src/google/protobuf/message.h",
49 "src/google/protobuf/message_lite.cc", 57 "src/google/protobuf/message_lite.cc",
50 "src/google/protobuf/message_lite.h", 58 "src/google/protobuf/message_lite.h",
59 "src/google/protobuf/metadata.cc",
60 "src/google/protobuf/metadata.h",
51 "src/google/protobuf/repeated_field.cc", 61 "src/google/protobuf/repeated_field.cc",
52 "src/google/protobuf/repeated_field.h", 62 "src/google/protobuf/repeated_field.h",
63 "src/google/protobuf/stubs/atomic_sequence_num.h",
53 "src/google/protobuf/stubs/atomicops.h", 64 "src/google/protobuf/stubs/atomicops.h",
65 "src/google/protobuf/stubs/atomicops_internals_aix.h",
66 "src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h",
54 "src/google/protobuf/stubs/atomicops_internals_arm_gcc.h", 67 "src/google/protobuf/stubs/atomicops_internals_arm_gcc.h",
68 "src/google/protobuf/stubs/atomicops_internals_arm_qnx.h",
55 "src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h", 69 "src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h",
70 "src/google/protobuf/stubs/atomicops_internals_generic_gcc.h",
56 "src/google/protobuf/stubs/atomicops_internals_macosx.h", 71 "src/google/protobuf/stubs/atomicops_internals_macosx.h",
57 "src/google/protobuf/stubs/atomicops_internals_mips_gcc.h", 72 "src/google/protobuf/stubs/atomicops_internals_mips_gcc.h",
73 "src/google/protobuf/stubs/atomicops_internals_pnacl.h",
74 "src/google/protobuf/stubs/atomicops_internals_solaris.h",
75 "src/google/protobuf/stubs/atomicops_internals_tsan.h",
58 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc", 76 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
59 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.h", 77 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.h",
60 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", 78 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
61 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.h", 79 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.h",
80 "src/google/protobuf/stubs/bytestream.cc",
81 "src/google/protobuf/stubs/bytestream.h",
82 "src/google/protobuf/stubs/callback.h",
83 "src/google/protobuf/stubs/casts.h",
62 "src/google/protobuf/stubs/common.cc", 84 "src/google/protobuf/stubs/common.cc",
63 "src/google/protobuf/stubs/common.h", 85 "src/google/protobuf/stubs/common.h",
86 "src/google/protobuf/stubs/fastmem.h",
64 "src/google/protobuf/stubs/hash.h", 87 "src/google/protobuf/stubs/hash.h",
65 "src/google/protobuf/stubs/map-util.h", 88 "src/google/protobuf/stubs/logging.h",
89 "src/google/protobuf/stubs/macros.h",
90 "src/google/protobuf/stubs/map_util.h",
91 "src/google/protobuf/stubs/mathlimits.h",
92 "src/google/protobuf/stubs/mutex.h",
66 "src/google/protobuf/stubs/once.cc", 93 "src/google/protobuf/stubs/once.cc",
67 "src/google/protobuf/stubs/once.h", 94 "src/google/protobuf/stubs/once.h",
68 "src/google/protobuf/stubs/platform_macros.h", 95 "src/google/protobuf/stubs/platform_macros.h",
96 "src/google/protobuf/stubs/port.h",
97 "src/google/protobuf/stubs/scoped_ptr.h",
98 "src/google/protobuf/stubs/status.cc",
99 "src/google/protobuf/stubs/status.h",
100 "src/google/protobuf/stubs/statusor.cc",
101 "src/google/protobuf/stubs/statusor.h",
102 "src/google/protobuf/stubs/stl_util.h",
103 "src/google/protobuf/stubs/stringpiece.cc",
104 "src/google/protobuf/stubs/stringpiece.h",
105 "src/google/protobuf/stubs/stringprintf.cc",
106 "src/google/protobuf/stubs/stringprintf.h",
107 "src/google/protobuf/stubs/strutil.cc",
108 "src/google/protobuf/stubs/strutil.h",
109 "src/google/protobuf/stubs/template_util.h",
110 "src/google/protobuf/stubs/time.cc",
111 "src/google/protobuf/stubs/time.h",
112 "src/google/protobuf/stubs/type_traits.h",
113 "src/google/protobuf/testing/googletest.h",
69 "src/google/protobuf/unknown_field_set.cc", 114 "src/google/protobuf/unknown_field_set.cc",
70 "src/google/protobuf/unknown_field_set.h", 115 "src/google/protobuf/unknown_field_set.h",
71 "src/google/protobuf/wire_format_lite.cc", 116 "src/google/protobuf/wire_format_lite.cc",
72 "src/google/protobuf/wire_format_lite.h", 117 "src/google/protobuf/wire_format_lite.h",
73 "src/google/protobuf/wire_format_lite_inl.h", 118 "src/google/protobuf/wire_format_lite_inl.h",
74 "$config_h_dir/config.h",
75 ] 119 ]
76 120
77 protobuf_lite_cflags = [] 121 protobuf_lite_cflags = []
78 if (is_win) { 122 if (is_win) {
79 protobuf_lite_cflags = [ 123 protobuf_lite_cflags = [
80 "/wd4018", # Signed/unsigned mismatch in comparison. 124 "/wd4018", # Signed/unsigned mismatch in comparison.
125 "/wd4065", # Switch statement contains 'default' but no 'case' labels
126 "/wd4146", # Unary minus operator applied to unsigned type
81 "/wd4244", # Implicit conversion, possible loss of data. 127 "/wd4244", # Implicit conversion, possible loss of data.
82 "/wd4355", # 'this' used in base member initializer list.
83 "/wd4267", # Size_t to int truncation. 128 "/wd4267", # Size_t to int truncation.
84 "/wd4291", # No matching operator delete for a placement new. 129 "/wd4291", # No matching operator delete for a placement new.
130 "/wd4355", # 'this' used in base member initializer list.
131 "/wd4506", # No definition for inline function.
85 ] 132 ]
86 } 133 }
87 134
88 component("protobuf_lite") { 135 component("protobuf_lite") {
89 sources = protobuf_lite_sources 136 sources = protobuf_lite_sources
90 137
91 configs -= [ "//build/config/compiler:chromium_code" ] 138 configs -= [ "//build/config/compiler:chromium_code" ]
92 configs += [ "//build/config/compiler:no_chromium_code" ] 139 configs += [ "//build/config/compiler:no_chromium_code" ]
93 if (is_win) { 140 if (is_win) {
94 configs -= [ "//build/config/win:lean_and_mean" ] 141 configs -= [ "//build/config/win:lean_and_mean" ]
(...skipping 17 matching lines...) Expand all
112 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't 159 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't
113 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls 160 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls
114 # into that category. Do not use in Chrome code. 161 # into that category. Do not use in Chrome code.
115 162
116 source_set("protobuf_full") { 163 source_set("protobuf_full") {
117 # Prevent people from depending on this outside our file. 164 # Prevent people from depending on this outside our file.
118 visibility = [ ":*" ] 165 visibility = [ ":*" ]
119 166
120 sources = protobuf_lite_sources 167 sources = protobuf_lite_sources
121 sources += [ 168 sources += [
122 "src/google/protobuf/compiler/code_generator.h", 169 "src/google/protobuf/any.cc",
123 "src/google/protobuf/compiler/command_line_interface.h", 170 "src/google/protobuf/any.h",
171 "src/google/protobuf/any.pb.cc",
172 "src/google/protobuf/any.pb.h",
173 "src/google/protobuf/api.pb.cc",
174 "src/google/protobuf/api.pb.h",
175 "src/google/protobuf/compiler/importer.cc",
124 "src/google/protobuf/compiler/importer.h", 176 "src/google/protobuf/compiler/importer.h",
125 "src/google/protobuf/compiler/java/java_doc_comment.cc", 177 "src/google/protobuf/compiler/parser.cc",
126 "src/google/protobuf/compiler/java/java_doc_comment.h",
127 "src/google/protobuf/compiler/parser.h", 178 "src/google/protobuf/compiler/parser.h",
128 "src/google/protobuf/descriptor.cc", 179 "src/google/protobuf/descriptor.cc",
129 "src/google/protobuf/descriptor.h",
130 "src/google/protobuf/descriptor.pb.cc", 180 "src/google/protobuf/descriptor.pb.cc",
131 "src/google/protobuf/descriptor.pb.h",
132 "src/google/protobuf/descriptor_database.cc", 181 "src/google/protobuf/descriptor_database.cc",
133 "src/google/protobuf/descriptor_database.h", 182 "src/google/protobuf/descriptor_database.h",
183 "src/google/protobuf/duration.pb.cc",
184 "src/google/protobuf/duration.pb.h",
134 "src/google/protobuf/dynamic_message.cc", 185 "src/google/protobuf/dynamic_message.cc",
135 "src/google/protobuf/dynamic_message.h", 186 "src/google/protobuf/dynamic_message.h",
187 "src/google/protobuf/empty.pb.cc",
188 "src/google/protobuf/empty.pb.h",
136 "src/google/protobuf/extension_set_heavy.cc", 189 "src/google/protobuf/extension_set_heavy.cc",
137 "src/google/protobuf/generated_enum_reflection.h", 190 "src/google/protobuf/field_mask.pb.cc",
191 "src/google/protobuf/field_mask.pb.h",
138 "src/google/protobuf/generated_message_reflection.cc", 192 "src/google/protobuf/generated_message_reflection.cc",
139 "src/google/protobuf/generated_message_reflection.h", 193 "src/google/protobuf/generated_message_reflection.h",
140 "src/google/protobuf/io/gzip_stream.h", 194
195 # gzip_stream.cc pulls in zlib, but it's not actually used by protoc, just
196 # by test code; so instead of compiling zlib for the host, let's just
197 # exclude these.
198 # "src/google/protobuf/io/gzip_stream.cc",
199 # "src/google/protobuf/io/gzip_stream.h",
200 "src/google/protobuf/io/printer.cc",
141 "src/google/protobuf/io/printer.h", 201 "src/google/protobuf/io/printer.h",
202 "src/google/protobuf/io/strtod.cc",
203 "src/google/protobuf/io/strtod.h",
204 "src/google/protobuf/io/tokenizer.cc",
142 "src/google/protobuf/io/tokenizer.h", 205 "src/google/protobuf/io/tokenizer.h",
206 "src/google/protobuf/io/zero_copy_stream_impl.cc",
143 "src/google/protobuf/io/zero_copy_stream_impl.h", 207 "src/google/protobuf/io/zero_copy_stream_impl.h",
208 "src/google/protobuf/map.h",
209 "src/google/protobuf/map_entry_lite.h",
210 "src/google/protobuf/map_field.cc",
211 "src/google/protobuf/map_field.h",
212 "src/google/protobuf/map_field_inl.h",
213 "src/google/protobuf/map_field_lite.h",
214 "src/google/protobuf/map_type_handler.h",
144 "src/google/protobuf/message.cc", 215 "src/google/protobuf/message.cc",
145 "src/google/protobuf/message.h",
146 "src/google/protobuf/reflection_ops.cc", 216 "src/google/protobuf/reflection_ops.cc",
147 "src/google/protobuf/reflection_ops.h", 217 "src/google/protobuf/reflection_ops.h",
148 "src/google/protobuf/service.cc", 218 "src/google/protobuf/service.cc",
149 "src/google/protobuf/service.h", 219 "src/google/protobuf/service.h",
150 "src/google/protobuf/stubs/stl_util.h", 220 "src/google/protobuf/source_context.pb.cc",
151 "src/google/protobuf/stubs/stringprintf.cc", 221 "src/google/protobuf/source_context.pb.h",
152 "src/google/protobuf/stubs/stringprintf.h", 222 "src/google/protobuf/struct.pb.cc",
223 "src/google/protobuf/struct.pb.h",
224 "src/google/protobuf/stubs/mathlimits.cc",
225 "src/google/protobuf/stubs/mathutil.h",
226 "src/google/protobuf/stubs/shared_ptr.h",
227 "src/google/protobuf/stubs/singleton.h",
228 "src/google/protobuf/stubs/status_macros.h",
153 "src/google/protobuf/stubs/structurally_valid.cc", 229 "src/google/protobuf/stubs/structurally_valid.cc",
154 "src/google/protobuf/stubs/strutil.cc",
155 "src/google/protobuf/stubs/strutil.h",
156 "src/google/protobuf/stubs/substitute.cc", 230 "src/google/protobuf/stubs/substitute.cc",
157 "src/google/protobuf/stubs/substitute.h", 231 "src/google/protobuf/stubs/substitute.h",
158 "src/google/protobuf/stubs/template_util.h",
159 "src/google/protobuf/stubs/type_traits.h",
160 "src/google/protobuf/text_format.cc", 232 "src/google/protobuf/text_format.cc",
161 "src/google/protobuf/text_format.h", 233 "src/google/protobuf/text_format.h",
234 "src/google/protobuf/timestamp.pb.cc",
235 "src/google/protobuf/timestamp.pb.h",
236 "src/google/protobuf/type.pb.cc",
237 "src/google/protobuf/type.pb.h",
238 "src/google/protobuf/util/field_comparator.cc",
239 "src/google/protobuf/util/field_comparator.h",
240 "src/google/protobuf/util/internal/constants.h",
241 "src/google/protobuf/util/internal/datapiece.cc",
242 "src/google/protobuf/util/internal/datapiece.h",
243 "src/google/protobuf/util/internal/default_value_objectwriter.cc",
244 "src/google/protobuf/util/internal/default_value_objectwriter.h",
245 "src/google/protobuf/util/internal/error_listener.cc",
246 "src/google/protobuf/util/internal/error_listener.h",
247 "src/google/protobuf/util/internal/field_mask_utility.cc",
248 "src/google/protobuf/util/internal/field_mask_utility.h",
249 "src/google/protobuf/util/internal/json_escaping.cc",
250 "src/google/protobuf/util/internal/json_escaping.h",
251 "src/google/protobuf/util/internal/json_objectwriter.cc",
252 "src/google/protobuf/util/internal/json_objectwriter.h",
253 "src/google/protobuf/util/internal/json_stream_parser.cc",
254 "src/google/protobuf/util/internal/json_stream_parser.h",
255 "src/google/protobuf/util/internal/location_tracker.h",
256 "src/google/protobuf/util/internal/object_location_tracker.h",
257 "src/google/protobuf/util/internal/object_source.h",
258 "src/google/protobuf/util/internal/object_writer.cc",
259 "src/google/protobuf/util/internal/object_writer.h",
260 "src/google/protobuf/util/internal/protostream_objectsource.cc",
261 "src/google/protobuf/util/internal/protostream_objectsource.h",
262 "src/google/protobuf/util/internal/protostream_objectwriter.cc",
263 "src/google/protobuf/util/internal/protostream_objectwriter.h",
264 "src/google/protobuf/util/internal/snake2camel_objectwriter.h",
265 "src/google/protobuf/util/internal/structured_objectwriter.h",
266 "src/google/protobuf/util/internal/type_info.cc",
267 "src/google/protobuf/util/internal/type_info.h",
268 "src/google/protobuf/util/internal/type_info_test_helper.cc",
269 "src/google/protobuf/util/internal/type_info_test_helper.h",
270 "src/google/protobuf/util/internal/utility.cc",
271 "src/google/protobuf/util/internal/utility.h",
272 "src/google/protobuf/util/json_util.cc",
273 "src/google/protobuf/util/json_util.h",
274 "src/google/protobuf/util/message_differencer.cc",
275 "src/google/protobuf/util/message_differencer.h",
276 "src/google/protobuf/util/type_resolver.h",
277 "src/google/protobuf/util/type_resolver_util.cc",
278 "src/google/protobuf/util/type_resolver_util.h",
162 "src/google/protobuf/wire_format.cc", 279 "src/google/protobuf/wire_format.cc",
163 "src/google/protobuf/wire_format.h", 280 "src/google/protobuf/wire_format.h",
164 281 "src/google/protobuf/wrappers.pb.cc",
165 # This file pulls in zlib, but it's not actually used by protoc, so 282 "src/google/protobuf/wrappers.pb.h",
166 # instead of compiling zlib for the host, let's just exclude this.
167 # "src/src/google/protobuf/io/gzip_stream.cc",
168 "src/google/protobuf/compiler/importer.cc",
169 "src/google/protobuf/compiler/parser.cc",
170 "src/google/protobuf/io/printer.cc",
171 "src/google/protobuf/io/tokenizer.cc",
172 "src/google/protobuf/io/zero_copy_stream_impl.cc",
173 ] 283 ]
174 284
175 configs -= [ "//build/config/compiler:chromium_code" ] 285 configs -= [ "//build/config/compiler:chromium_code" ]
176 configs += [ "//build/config/compiler:no_chromium_code" ] 286 configs += [ "//build/config/compiler:no_chromium_code" ]
177 if (is_win) { 287 if (is_win) {
178 configs -= [ "//build/config/win:lean_and_mean" ] 288 configs -= [ "//build/config/win:lean_and_mean" ]
179 } 289 }
180 public_configs = [ 290 public_configs = [
181 ":protobuf_config", 291 ":protobuf_config",
182 292
183 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 293 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
184 "//build/config/compiler:no_size_t_to_int_warning", 294 "//build/config/compiler:no_size_t_to_int_warning",
185 ] 295 ]
186 296
187 cflags = protobuf_lite_cflags 297 cflags = protobuf_lite_cflags
188 } 298 }
189 299
190 # Only compile the compiler for the host architecture. 300 # Only compile the compiler for the host architecture.
191 if (current_toolchain == host_toolchain) { 301 if (current_toolchain == host_toolchain) {
192 executable("protoc") { 302 executable("protoc") {
193 sources = [ 303 sources = [
194 "src/google/protobuf/compiler/code_generator.cc", 304 "src/google/protobuf/compiler/code_generator.cc",
305 "src/google/protobuf/compiler/code_generator.h",
195 "src/google/protobuf/compiler/command_line_interface.cc", 306 "src/google/protobuf/compiler/command_line_interface.cc",
307 "src/google/protobuf/compiler/command_line_interface.h",
196 "src/google/protobuf/compiler/cpp/cpp_enum.cc", 308 "src/google/protobuf/compiler/cpp/cpp_enum.cc",
197 "src/google/protobuf/compiler/cpp/cpp_enum.h", 309 "src/google/protobuf/compiler/cpp/cpp_enum.h",
198 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 310 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
199 "src/google/protobuf/compiler/cpp/cpp_enum_field.h", 311 "src/google/protobuf/compiler/cpp/cpp_enum_field.h",
200 "src/google/protobuf/compiler/cpp/cpp_extension.cc", 312 "src/google/protobuf/compiler/cpp/cpp_extension.cc",
201 "src/google/protobuf/compiler/cpp/cpp_extension.h", 313 "src/google/protobuf/compiler/cpp/cpp_extension.h",
202 "src/google/protobuf/compiler/cpp/cpp_field.cc", 314 "src/google/protobuf/compiler/cpp/cpp_field.cc",
203 "src/google/protobuf/compiler/cpp/cpp_field.h", 315 "src/google/protobuf/compiler/cpp/cpp_field.h",
204 "src/google/protobuf/compiler/cpp/cpp_file.cc", 316 "src/google/protobuf/compiler/cpp/cpp_file.cc",
205 "src/google/protobuf/compiler/cpp/cpp_file.h", 317 "src/google/protobuf/compiler/cpp/cpp_file.h",
206 "src/google/protobuf/compiler/cpp/cpp_generator.cc", 318 "src/google/protobuf/compiler/cpp/cpp_generator.cc",
319 "src/google/protobuf/compiler/cpp/cpp_generator.h",
207 "src/google/protobuf/compiler/cpp/cpp_helpers.cc", 320 "src/google/protobuf/compiler/cpp/cpp_helpers.cc",
208 "src/google/protobuf/compiler/cpp/cpp_helpers.h", 321 "src/google/protobuf/compiler/cpp/cpp_helpers.h",
322 "src/google/protobuf/compiler/cpp/cpp_map_field.cc",
323 "src/google/protobuf/compiler/cpp/cpp_map_field.h",
209 "src/google/protobuf/compiler/cpp/cpp_message.cc", 324 "src/google/protobuf/compiler/cpp/cpp_message.cc",
210 "src/google/protobuf/compiler/cpp/cpp_message.h", 325 "src/google/protobuf/compiler/cpp/cpp_message.h",
211 "src/google/protobuf/compiler/cpp/cpp_message_field.cc", 326 "src/google/protobuf/compiler/cpp/cpp_message_field.cc",
212 "src/google/protobuf/compiler/cpp/cpp_message_field.h", 327 "src/google/protobuf/compiler/cpp/cpp_message_field.h",
328 "src/google/protobuf/compiler/cpp/cpp_options.h",
213 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", 329 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
214 "src/google/protobuf/compiler/cpp/cpp_primitive_field.h", 330 "src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
215 "src/google/protobuf/compiler/cpp/cpp_service.cc", 331 "src/google/protobuf/compiler/cpp/cpp_service.cc",
216 "src/google/protobuf/compiler/cpp/cpp_service.h", 332 "src/google/protobuf/compiler/cpp/cpp_service.h",
217 "src/google/protobuf/compiler/cpp/cpp_string_field.cc", 333 "src/google/protobuf/compiler/cpp/cpp_string_field.cc",
218 "src/google/protobuf/compiler/cpp/cpp_string_field.h", 334 "src/google/protobuf/compiler/cpp/cpp_string_field.h",
335 "src/google/protobuf/compiler/csharp/csharp_enum.cc",
336 "src/google/protobuf/compiler/csharp/csharp_enum.h",
337 "src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
338 "src/google/protobuf/compiler/csharp/csharp_enum_field.h",
339 "src/google/protobuf/compiler/csharp/csharp_field_base.cc",
340 "src/google/protobuf/compiler/csharp/csharp_field_base.h",
341 "src/google/protobuf/compiler/csharp/csharp_generator.cc",
342 "src/google/protobuf/compiler/csharp/csharp_generator.h",
343 "src/google/protobuf/compiler/csharp/csharp_helpers.cc",
344 "src/google/protobuf/compiler/csharp/csharp_helpers.h",
345 "src/google/protobuf/compiler/csharp/csharp_map_field.cc",
346 "src/google/protobuf/compiler/csharp/csharp_map_field.h",
347 "src/google/protobuf/compiler/csharp/csharp_message.cc",
348 "src/google/protobuf/compiler/csharp/csharp_message.h",
349 "src/google/protobuf/compiler/csharp/csharp_message_field.cc",
350 "src/google/protobuf/compiler/csharp/csharp_message_field.h",
351 "src/google/protobuf/compiler/csharp/csharp_names.h",
352 "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
353 "src/google/protobuf/compiler/csharp/csharp_primitive_field.h",
354 "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
355 "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h",
356 "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
357 "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h",
358 "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
359 "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h",
360 "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
361 "src/google/protobuf/compiler/csharp/csharp_source_generator_base.h",
362 "src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc",
363 "src/google/protobuf/compiler/csharp/csharp_umbrella_class.h",
364 "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
365 "src/google/protobuf/compiler/csharp/csharp_wrapper_field.h",
366 "src/google/protobuf/compiler/java/java_context.cc",
367 "src/google/protobuf/compiler/java/java_context.h",
368 "src/google/protobuf/compiler/java/java_doc_comment.cc",
369 "src/google/protobuf/compiler/java/java_doc_comment.h",
219 "src/google/protobuf/compiler/java/java_enum.cc", 370 "src/google/protobuf/compiler/java/java_enum.cc",
220 "src/google/protobuf/compiler/java/java_enum.h", 371 "src/google/protobuf/compiler/java/java_enum.h",
221 "src/google/protobuf/compiler/java/java_enum_field.cc", 372 "src/google/protobuf/compiler/java/java_enum_field.cc",
222 "src/google/protobuf/compiler/java/java_enum_field.h", 373 "src/google/protobuf/compiler/java/java_enum_field.h",
374 "src/google/protobuf/compiler/java/java_enum_field_lite.cc",
375 "src/google/protobuf/compiler/java/java_enum_field_lite.h",
223 "src/google/protobuf/compiler/java/java_extension.cc", 376 "src/google/protobuf/compiler/java/java_extension.cc",
224 "src/google/protobuf/compiler/java/java_extension.h", 377 "src/google/protobuf/compiler/java/java_extension.h",
225 "src/google/protobuf/compiler/java/java_field.cc", 378 "src/google/protobuf/compiler/java/java_field.cc",
226 "src/google/protobuf/compiler/java/java_field.h", 379 "src/google/protobuf/compiler/java/java_field.h",
227 "src/google/protobuf/compiler/java/java_file.cc", 380 "src/google/protobuf/compiler/java/java_file.cc",
228 "src/google/protobuf/compiler/java/java_file.h", 381 "src/google/protobuf/compiler/java/java_file.h",
229 "src/google/protobuf/compiler/java/java_generator.cc", 382 "src/google/protobuf/compiler/java/java_generator.cc",
383 "src/google/protobuf/compiler/java/java_generator.h",
384 "src/google/protobuf/compiler/java/java_generator_factory.cc",
385 "src/google/protobuf/compiler/java/java_generator_factory.h",
230 "src/google/protobuf/compiler/java/java_helpers.cc", 386 "src/google/protobuf/compiler/java/java_helpers.cc",
231 "src/google/protobuf/compiler/java/java_helpers.h", 387 "src/google/protobuf/compiler/java/java_helpers.h",
388 "src/google/protobuf/compiler/java/java_lazy_message_field.cc",
389 "src/google/protobuf/compiler/java/java_lazy_message_field.h",
390 "src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc",
391 "src/google/protobuf/compiler/java/java_lazy_message_field_lite.h",
392 "src/google/protobuf/compiler/java/java_map_field.cc",
393 "src/google/protobuf/compiler/java/java_map_field.h",
394 "src/google/protobuf/compiler/java/java_map_field_lite.cc",
395 "src/google/protobuf/compiler/java/java_map_field_lite.h",
232 "src/google/protobuf/compiler/java/java_message.cc", 396 "src/google/protobuf/compiler/java/java_message.cc",
233 "src/google/protobuf/compiler/java/java_message.h", 397 "src/google/protobuf/compiler/java/java_message.h",
398 "src/google/protobuf/compiler/java/java_message_builder.cc",
399 "src/google/protobuf/compiler/java/java_message_builder.h",
400 "src/google/protobuf/compiler/java/java_message_builder_lite.cc",
401 "src/google/protobuf/compiler/java/java_message_builder_lite.h",
234 "src/google/protobuf/compiler/java/java_message_field.cc", 402 "src/google/protobuf/compiler/java/java_message_field.cc",
235 "src/google/protobuf/compiler/java/java_message_field.h", 403 "src/google/protobuf/compiler/java/java_message_field.h",
404 "src/google/protobuf/compiler/java/java_message_field_lite.cc",
405 "src/google/protobuf/compiler/java/java_message_field_lite.h",
406 "src/google/protobuf/compiler/java/java_message_lite.cc",
407 "src/google/protobuf/compiler/java/java_message_lite.h",
408 "src/google/protobuf/compiler/java/java_name_resolver.cc",
409 "src/google/protobuf/compiler/java/java_name_resolver.h",
236 "src/google/protobuf/compiler/java/java_primitive_field.cc", 410 "src/google/protobuf/compiler/java/java_primitive_field.cc",
237 "src/google/protobuf/compiler/java/java_primitive_field.h", 411 "src/google/protobuf/compiler/java/java_primitive_field.h",
412 "src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
413 "src/google/protobuf/compiler/java/java_primitive_field_lite.h",
238 "src/google/protobuf/compiler/java/java_service.cc", 414 "src/google/protobuf/compiler/java/java_service.cc",
239 "src/google/protobuf/compiler/java/java_service.h", 415 "src/google/protobuf/compiler/java/java_service.h",
416 "src/google/protobuf/compiler/java/java_shared_code_generator.cc",
417 "src/google/protobuf/compiler/java/java_shared_code_generator.h",
240 "src/google/protobuf/compiler/java/java_string_field.cc", 418 "src/google/protobuf/compiler/java/java_string_field.cc",
241 "src/google/protobuf/compiler/java/java_string_field.h", 419 "src/google/protobuf/compiler/java/java_string_field.h",
420 "src/google/protobuf/compiler/java/java_string_field_lite.cc",
421 "src/google/protobuf/compiler/java/java_string_field_lite.h",
422 "src/google/protobuf/compiler/javanano/javanano_enum.cc",
423 "src/google/protobuf/compiler/javanano/javanano_enum.h",
424 "src/google/protobuf/compiler/javanano/javanano_enum_field.cc",
425 "src/google/protobuf/compiler/javanano/javanano_enum_field.h",
426 "src/google/protobuf/compiler/javanano/javanano_extension.cc",
427 "src/google/protobuf/compiler/javanano/javanano_extension.h",
428 "src/google/protobuf/compiler/javanano/javanano_field.cc",
429 "src/google/protobuf/compiler/javanano/javanano_field.h",
430 "src/google/protobuf/compiler/javanano/javanano_file.cc",
431 "src/google/protobuf/compiler/javanano/javanano_file.h",
432 "src/google/protobuf/compiler/javanano/javanano_generator.cc",
433 "src/google/protobuf/compiler/javanano/javanano_generator.h",
434 "src/google/protobuf/compiler/javanano/javanano_helpers.cc",
435 "src/google/protobuf/compiler/javanano/javanano_helpers.h",
436 "src/google/protobuf/compiler/javanano/javanano_map_field.cc",
437 "src/google/protobuf/compiler/javanano/javanano_map_field.h",
438 "src/google/protobuf/compiler/javanano/javanano_message.cc",
439 "src/google/protobuf/compiler/javanano/javanano_message.h",
440 "src/google/protobuf/compiler/javanano/javanano_message_field.cc",
441 "src/google/protobuf/compiler/javanano/javanano_message_field.h",
442 "src/google/protobuf/compiler/javanano/javanano_params.h",
443 "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc",
444 "src/google/protobuf/compiler/javanano/javanano_primitive_field.h",
242 "src/google/protobuf/compiler/main.cc", 445 "src/google/protobuf/compiler/main.cc",
446 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
447 "src/google/protobuf/compiler/objectivec/objectivec_enum.h",
448 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
449 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h",
450 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
451 "src/google/protobuf/compiler/objectivec/objectivec_extension.h",
452 "src/google/protobuf/compiler/objectivec/objectivec_field.cc",
453 "src/google/protobuf/compiler/objectivec/objectivec_field.h",
454 "src/google/protobuf/compiler/objectivec/objectivec_file.cc",
455 "src/google/protobuf/compiler/objectivec/objectivec_file.h",
456 "src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
457 "src/google/protobuf/compiler/objectivec/objectivec_generator.h",
458 "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
459 "src/google/protobuf/compiler/objectivec/objectivec_helpers.h",
460 "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
461 "src/google/protobuf/compiler/objectivec/objectivec_map_field.h",
462 "src/google/protobuf/compiler/objectivec/objectivec_message.cc",
463 "src/google/protobuf/compiler/objectivec/objectivec_message.h",
464 "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
465 "src/google/protobuf/compiler/objectivec/objectivec_message_field.h",
466 "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
467 "src/google/protobuf/compiler/objectivec/objectivec_oneof.h",
468 "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
469 "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h",
243 "src/google/protobuf/compiler/plugin.cc", 470 "src/google/protobuf/compiler/plugin.cc",
471 "src/google/protobuf/compiler/plugin.h",
244 "src/google/protobuf/compiler/plugin.pb.cc", 472 "src/google/protobuf/compiler/plugin.pb.cc",
473 "src/google/protobuf/compiler/plugin.pb.h",
245 "src/google/protobuf/compiler/python/python_generator.cc", 474 "src/google/protobuf/compiler/python/python_generator.cc",
475 "src/google/protobuf/compiler/python/python_generator.h",
476 "src/google/protobuf/compiler/ruby/ruby_generator.cc",
477 "src/google/protobuf/compiler/ruby/ruby_generator.h",
246 "src/google/protobuf/compiler/subprocess.cc", 478 "src/google/protobuf/compiler/subprocess.cc",
247 "src/google/protobuf/compiler/subprocess.h", 479 "src/google/protobuf/compiler/subprocess.h",
248 "src/google/protobuf/compiler/zip_writer.cc", 480 "src/google/protobuf/compiler/zip_writer.cc",
249 "src/google/protobuf/compiler/zip_writer.h", 481 "src/google/protobuf/compiler/zip_writer.h",
250 ] 482 ]
251 483
252 configs -= [ "//build/config/compiler:chromium_code" ] 484 configs -= [ "//build/config/compiler:chromium_code" ]
253 configs += [ "//build/config/compiler:no_chromium_code" ] 485 configs += [ "//build/config/compiler:no_chromium_code" ]
254 if (is_win) { 486 if (is_win) {
255 # This is defined internally, don't warn on duplicate. 487 # This is defined internally, don't warn on duplicate.
256 configs -= [ "//build/config/win:lean_and_mean" ] 488 configs -= [ "//build/config/win:lean_and_mean" ]
257 } 489 }
258 490
259 cflags = protobuf_lite_cflags 491 cflags = protobuf_lite_cflags
260 492
261 deps = [ 493 deps = [
262 ":protobuf_full", 494 ":protobuf_full",
263 ] 495 ]
264 deps += [ "//build/config/sanitizers:deps" ] 496 deps += [ "//build/config/sanitizers:deps" ]
265 } 497 }
266 } 498 }
267 499
268 google_python_dir = "$root_out_dir/pyproto/google" 500 google_python_dir = "$root_out_dir/pyproto/google"
269 501
270 copy("copy_google") { 502 copy("copy_google") {
271 sources = [ 503 sources = [
272 "__init__.py", 504 "python/google/__init__.py",
273 ] 505 ]
274 outputs = [ 506 outputs = [
275 "$google_python_dir/{{source_file_part}}", 507 "$google_python_dir/{{source_file_part}}",
276 ] 508 ]
277 } 509 }
278 510
279 copy("copy_google_protobuf") { 511 copy("copy_google_protobuf") {
280 sources = [ 512 sources = [
281 "python/google/protobuf/__init__.py", 513 "python/google/protobuf/__init__.py",
282 "python/google/protobuf/descriptor.py", 514 "python/google/protobuf/descriptor.py",
283 "python/google/protobuf/descriptor_database.py", 515 "python/google/protobuf/descriptor_database.py",
516
517 # TODO(ncarter): protoc's python generator treats descriptor.proto
518 # specially, but only when the input path is exactly
519 # "google/protobuf/descriptor.proto". I'm not sure how to execute a rule
520 # from a different directory. For now, use a manually-generated copy of
521 # descriptor_pb2.py.
522 "python/google/protobuf/descriptor_pb2.py",
284 "python/google/protobuf/descriptor_pool.py", 523 "python/google/protobuf/descriptor_pool.py",
285 "python/google/protobuf/message.py", 524 "python/google/protobuf/message.py",
286 "python/google/protobuf/message_factory.py", 525 "python/google/protobuf/message_factory.py",
526 "python/google/protobuf/proto_builder.py",
287 "python/google/protobuf/reflection.py", 527 "python/google/protobuf/reflection.py",
288 "python/google/protobuf/service.py", 528 "python/google/protobuf/service.py",
289 "python/google/protobuf/service_reflection.py", 529 "python/google/protobuf/service_reflection.py",
530 "python/google/protobuf/symbol_database.py",
531 "python/google/protobuf/text_encoding.py",
290 "python/google/protobuf/text_format.py", 532 "python/google/protobuf/text_format.py",
291
292 # TODO(ncarter): protoc"s python generator treats
293 # descriptor.proto specially, but it's not possible to trigger
294 # the special treatment unless you run protoc from ./src/src
295 # (the treatment is based on the path to the .proto file
296 # matching a constant exactly). I'm not sure how to convince
297 # gyp to execute a rule from a different directory. Until this
298 # is resolved, use a copy of descriptor_pb2.py that I manually
299 # generated.
300 "descriptor_pb2.py",
301 ] 533 ]
302 outputs = [ 534 outputs = [
303 "$google_python_dir/protobuf/{{source_file_part}}", 535 "$google_python_dir/protobuf/{{source_file_part}}",
304 ] 536 ]
305 } 537 }
306 538
307 copy("copy_google_protobuf_internal") { 539 copy("copy_google_protobuf_internal") {
308 sources = [ 540 sources = [
309 "python/google/protobuf/internal/__init__.py", 541 "python/google/protobuf/internal/__init__.py",
310 "python/google/protobuf/internal/api_implementation.py", 542 "python/google/protobuf/internal/api_implementation.py",
311 "python/google/protobuf/internal/containers.py", 543 "python/google/protobuf/internal/containers.py",
312 "python/google/protobuf/internal/cpp_message.py",
313 "python/google/protobuf/internal/decoder.py", 544 "python/google/protobuf/internal/decoder.py",
314 "python/google/protobuf/internal/encoder.py", 545 "python/google/protobuf/internal/encoder.py",
315 "python/google/protobuf/internal/enum_type_wrapper.py", 546 "python/google/protobuf/internal/enum_type_wrapper.py",
316 "python/google/protobuf/internal/generator_test.py", 547 "python/google/protobuf/internal/generator_test.py",
317 "python/google/protobuf/internal/message_listener.py", 548 "python/google/protobuf/internal/message_listener.py",
318 "python/google/protobuf/internal/python_message.py", 549 "python/google/protobuf/internal/python_message.py",
319 "python/google/protobuf/internal/type_checkers.py", 550 "python/google/protobuf/internal/type_checkers.py",
320 "python/google/protobuf/internal/wire_format.py", 551 "python/google/protobuf/internal/wire_format.py",
321 ] 552 ]
322 outputs = [ 553 outputs = [
323 "$google_python_dir/protobuf/internal/{{source_file_part}}", 554 "$google_python_dir/protobuf/internal/{{source_file_part}}",
324 ] 555 ]
325 } 556 }
326 557
558 copy("copy_google_protobuf_pyext") {
559 sources = [
560 "python/google/protobuf/pyext/__init__.py",
561 "python/google/protobuf/pyext/cpp_message.py",
562 ]
563 outputs = [
564 "$google_python_dir/protobuf/pyext/{{source_file_part}}",
565 ]
566 }
567
327 group("py_proto") { 568 group("py_proto") {
328 public_deps = [ 569 public_deps = [
329 ":copy_google", 570 ":copy_google",
330 ":copy_google_protobuf", 571 ":copy_google_protobuf",
331 ":copy_google_protobuf_internal", 572 ":copy_google_protobuf_internal",
332 ] 573 ]
333 574
334 # Targets that depend on this should depend on the copied data files. 575 # Targets that depend on this should depend on the copied data files.
335 data = get_target_outputs(":copy_google") 576 data = get_target_outputs(":copy_google")
336 data += get_target_outputs(":copy_google_protobuf") 577 data += get_target_outputs(":copy_google_protobuf")
337 data += get_target_outputs(":copy_google_protobuf_internal") 578 data += get_target_outputs(":copy_google_protobuf_internal")
338 } 579 }
OLDNEW
« no previous file with comments | « third_party/protobuf/BUILD ('k') | third_party/protobuf/CHANGES.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698