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

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

Issue 1322483002: Revert https://codereview.chromium.org/1291903002 (protobuf roll). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
5 config("protobuf_config") { 11 config("protobuf_config") {
6 include_dirs = [ "src" ] 12 include_dirs = [
13 "src",
14 config_h_dir,
15 ]
7 defines = [ 16 defines = [
8 "GOOGLE_PROTOBUF_NO_RTTI", 17 "GOOGLE_PROTOBUF_NO_RTTI",
9 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", 18 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
10 "HAVE_PTHREAD",
11 ] 19 ]
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 }
19 } 20 }
20 21
21 if (is_component_build) { 22 if (is_component_build) {
22 config("protobuf_use_dlls") { 23 config("protobuf_use_dlls") {
23 defines = [ "PROTOBUF_USE_DLLS" ] 24 defines = [ "PROTOBUF_USE_DLLS" ]
24 } 25 }
25 } 26 }
26 27
27 # This config should be applied to targets using generated code from the proto 28 # This config should be applied to targets using generated code from the proto
28 # compiler. It sets up the include directories properly. 29 # compiler. It sets up the include directories properly.
29 config("using_proto") { 30 config("using_proto") {
30 include_dirs = [ 31 include_dirs = [
31 "src", 32 "src",
32 "$root_gen_dir/protoc_out", 33 "$root_gen_dir/protoc_out",
33 ] 34 ]
34 } 35 }
35 36
36 protobuf_lite_sources = [ 37 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",
43 "src/google/protobuf/extension_set.cc", 38 "src/google/protobuf/extension_set.cc",
44 "src/google/protobuf/extension_set.h", 39 "src/google/protobuf/extension_set.h",
45 "src/google/protobuf/generated_enum_reflection.h",
46 "src/google/protobuf/generated_enum_util.h",
47 "src/google/protobuf/generated_message_util.cc", 40 "src/google/protobuf/generated_message_util.cc",
48 "src/google/protobuf/generated_message_util.h", 41 "src/google/protobuf/generated_message_util.h",
49 "src/google/protobuf/io/coded_stream.cc", 42 "src/google/protobuf/io/coded_stream.cc",
50 "src/google/protobuf/io/coded_stream.h", 43 "src/google/protobuf/io/coded_stream.h",
51 "src/google/protobuf/io/coded_stream_inl.h", 44 "src/google/protobuf/io/coded_stream_inl.h",
52 "src/google/protobuf/io/zero_copy_stream.cc", 45 "src/google/protobuf/io/zero_copy_stream.cc",
53 "src/google/protobuf/io/zero_copy_stream.h", 46 "src/google/protobuf/io/zero_copy_stream.h",
54 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 47 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
55 "src/google/protobuf/io/zero_copy_stream_impl_lite.h", 48 "src/google/protobuf/io/zero_copy_stream_impl_lite.h",
56 "src/google/protobuf/message.h",
57 "src/google/protobuf/message_lite.cc", 49 "src/google/protobuf/message_lite.cc",
58 "src/google/protobuf/message_lite.h", 50 "src/google/protobuf/message_lite.h",
59 "src/google/protobuf/metadata.cc",
60 "src/google/protobuf/metadata.h",
61 "src/google/protobuf/repeated_field.cc", 51 "src/google/protobuf/repeated_field.cc",
62 "src/google/protobuf/repeated_field.h", 52 "src/google/protobuf/repeated_field.h",
63 "src/google/protobuf/stubs/atomic_sequence_num.h",
64 "src/google/protobuf/stubs/atomicops.h", 53 "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",
67 "src/google/protobuf/stubs/atomicops_internals_arm_gcc.h", 54 "src/google/protobuf/stubs/atomicops_internals_arm_gcc.h",
68 "src/google/protobuf/stubs/atomicops_internals_arm_qnx.h",
69 "src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h", 55 "src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h",
70 "src/google/protobuf/stubs/atomicops_internals_generic_gcc.h",
71 "src/google/protobuf/stubs/atomicops_internals_macosx.h", 56 "src/google/protobuf/stubs/atomicops_internals_macosx.h",
72 "src/google/protobuf/stubs/atomicops_internals_mips_gcc.h", 57 "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",
76 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc", 58 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc",
77 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.h", 59 "src/google/protobuf/stubs/atomicops_internals_x86_gcc.h",
78 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", 60 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc",
79 "src/google/protobuf/stubs/atomicops_internals_x86_msvc.h", 61 "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",
84 "src/google/protobuf/stubs/common.cc", 62 "src/google/protobuf/stubs/common.cc",
85 "src/google/protobuf/stubs/common.h", 63 "src/google/protobuf/stubs/common.h",
86 "src/google/protobuf/stubs/fastmem.h",
87 "src/google/protobuf/stubs/hash.h", 64 "src/google/protobuf/stubs/hash.h",
88 "src/google/protobuf/stubs/logging.h", 65 "src/google/protobuf/stubs/map-util.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",
93 "src/google/protobuf/stubs/once.cc", 66 "src/google/protobuf/stubs/once.cc",
94 "src/google/protobuf/stubs/once.h", 67 "src/google/protobuf/stubs/once.h",
95 "src/google/protobuf/stubs/platform_macros.h", 68 "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",
114 "src/google/protobuf/unknown_field_set.cc", 69 "src/google/protobuf/unknown_field_set.cc",
115 "src/google/protobuf/unknown_field_set.h", 70 "src/google/protobuf/unknown_field_set.h",
116 "src/google/protobuf/wire_format_lite.cc", 71 "src/google/protobuf/wire_format_lite.cc",
117 "src/google/protobuf/wire_format_lite.h", 72 "src/google/protobuf/wire_format_lite.h",
118 "src/google/protobuf/wire_format_lite_inl.h", 73 "src/google/protobuf/wire_format_lite_inl.h",
74 "$config_h_dir/config.h",
119 ] 75 ]
120 76
121 protobuf_lite_cflags = [] 77 protobuf_lite_cflags = []
122 if (is_win) { 78 if (is_win) {
123 protobuf_lite_cflags = [ 79 protobuf_lite_cflags = [
124 "/wd4018", # Signed/unsigned mismatch in comparison. 80 "/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
127 "/wd4244", # Implicit conversion, possible loss of data. 81 "/wd4244", # Implicit conversion, possible loss of data.
82 "/wd4355", # 'this' used in base member initializer list.
128 "/wd4267", # Size_t to int truncation. 83 "/wd4267", # Size_t to int truncation.
129 "/wd4291", # No matching operator delete for a placement new. 84 "/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.
132 ] 85 ]
133 } 86 }
134 87
135 component("protobuf_lite") { 88 component("protobuf_lite") {
136 sources = protobuf_lite_sources 89 sources = protobuf_lite_sources
137 90
138 configs -= [ "//build/config/compiler:chromium_code" ] 91 configs -= [ "//build/config/compiler:chromium_code" ]
139 configs += [ "//build/config/compiler:no_chromium_code" ] 92 configs += [ "//build/config/compiler:no_chromium_code" ]
140 if (is_win) { 93 if (is_win) {
141 configs -= [ "//build/config/win:lean_and_mean" ] 94 configs -= [ "//build/config/win:lean_and_mean" ]
(...skipping 17 matching lines...) Expand all
159 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't 112 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't
160 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls 113 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls
161 # into that category. Do not use in Chrome code. 114 # into that category. Do not use in Chrome code.
162 115
163 source_set("protobuf_full") { 116 source_set("protobuf_full") {
164 # Prevent people from depending on this outside our file. 117 # Prevent people from depending on this outside our file.
165 visibility = [ ":*" ] 118 visibility = [ ":*" ]
166 119
167 sources = protobuf_lite_sources 120 sources = protobuf_lite_sources
168 sources += [ 121 sources += [
169 "src/google/protobuf/any.cc", 122 "src/google/protobuf/compiler/code_generator.h",
170 "src/google/protobuf/any.h", 123 "src/google/protobuf/compiler/command_line_interface.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",
176 "src/google/protobuf/compiler/importer.h", 124 "src/google/protobuf/compiler/importer.h",
177 "src/google/protobuf/compiler/parser.cc", 125 "src/google/protobuf/compiler/java/java_doc_comment.cc",
126 "src/google/protobuf/compiler/java/java_doc_comment.h",
178 "src/google/protobuf/compiler/parser.h", 127 "src/google/protobuf/compiler/parser.h",
179 "src/google/protobuf/descriptor.cc", 128 "src/google/protobuf/descriptor.cc",
129 "src/google/protobuf/descriptor.h",
180 "src/google/protobuf/descriptor.pb.cc", 130 "src/google/protobuf/descriptor.pb.cc",
131 "src/google/protobuf/descriptor.pb.h",
181 "src/google/protobuf/descriptor_database.cc", 132 "src/google/protobuf/descriptor_database.cc",
182 "src/google/protobuf/descriptor_database.h", 133 "src/google/protobuf/descriptor_database.h",
183 "src/google/protobuf/duration.pb.cc",
184 "src/google/protobuf/duration.pb.h",
185 "src/google/protobuf/dynamic_message.cc", 134 "src/google/protobuf/dynamic_message.cc",
186 "src/google/protobuf/dynamic_message.h", 135 "src/google/protobuf/dynamic_message.h",
187 "src/google/protobuf/empty.pb.cc",
188 "src/google/protobuf/empty.pb.h",
189 "src/google/protobuf/extension_set_heavy.cc", 136 "src/google/protobuf/extension_set_heavy.cc",
190 "src/google/protobuf/field_mask.pb.cc", 137 "src/google/protobuf/generated_enum_reflection.h",
191 "src/google/protobuf/field_mask.pb.h",
192 "src/google/protobuf/generated_message_reflection.cc", 138 "src/google/protobuf/generated_message_reflection.cc",
193 "src/google/protobuf/generated_message_reflection.h", 139 "src/google/protobuf/generated_message_reflection.h",
194 140 "src/google/protobuf/io/gzip_stream.h",
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",
201 "src/google/protobuf/io/printer.h", 141 "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",
205 "src/google/protobuf/io/tokenizer.h", 142 "src/google/protobuf/io/tokenizer.h",
206 "src/google/protobuf/io/zero_copy_stream_impl.cc",
207 "src/google/protobuf/io/zero_copy_stream_impl.h", 143 "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",
215 "src/google/protobuf/message.cc", 144 "src/google/protobuf/message.cc",
145 "src/google/protobuf/message.h",
216 "src/google/protobuf/reflection_ops.cc", 146 "src/google/protobuf/reflection_ops.cc",
217 "src/google/protobuf/reflection_ops.h", 147 "src/google/protobuf/reflection_ops.h",
218 "src/google/protobuf/service.cc", 148 "src/google/protobuf/service.cc",
219 "src/google/protobuf/service.h", 149 "src/google/protobuf/service.h",
220 "src/google/protobuf/source_context.pb.cc", 150 "src/google/protobuf/stubs/stl_util.h",
221 "src/google/protobuf/source_context.pb.h", 151 "src/google/protobuf/stubs/stringprintf.cc",
222 "src/google/protobuf/struct.pb.cc", 152 "src/google/protobuf/stubs/stringprintf.h",
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",
229 "src/google/protobuf/stubs/structurally_valid.cc", 153 "src/google/protobuf/stubs/structurally_valid.cc",
154 "src/google/protobuf/stubs/strutil.cc",
155 "src/google/protobuf/stubs/strutil.h",
230 "src/google/protobuf/stubs/substitute.cc", 156 "src/google/protobuf/stubs/substitute.cc",
231 "src/google/protobuf/stubs/substitute.h", 157 "src/google/protobuf/stubs/substitute.h",
158 "src/google/protobuf/stubs/template_util.h",
159 "src/google/protobuf/stubs/type_traits.h",
232 "src/google/protobuf/text_format.cc", 160 "src/google/protobuf/text_format.cc",
233 "src/google/protobuf/text_format.h", 161 "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",
279 "src/google/protobuf/wire_format.cc", 162 "src/google/protobuf/wire_format.cc",
280 "src/google/protobuf/wire_format.h", 163 "src/google/protobuf/wire_format.h",
281 "src/google/protobuf/wrappers.pb.cc", 164
282 "src/google/protobuf/wrappers.pb.h", 165 # This file pulls in zlib, but it's not actually used by protoc, so
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",
283 ] 173 ]
284 174
285 configs -= [ "//build/config/compiler:chromium_code" ] 175 configs -= [ "//build/config/compiler:chromium_code" ]
286 configs += [ "//build/config/compiler:no_chromium_code" ] 176 configs += [ "//build/config/compiler:no_chromium_code" ]
287 if (is_win) { 177 if (is_win) {
288 configs -= [ "//build/config/win:lean_and_mean" ] 178 configs -= [ "//build/config/win:lean_and_mean" ]
289 } 179 }
290 public_configs = [ 180 public_configs = [
291 ":protobuf_config", 181 ":protobuf_config",
292 182
293 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 183 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
294 "//build/config/compiler:no_size_t_to_int_warning", 184 "//build/config/compiler:no_size_t_to_int_warning",
295 ] 185 ]
296 186
297 cflags = protobuf_lite_cflags 187 cflags = protobuf_lite_cflags
298 } 188 }
299 189
300 # Only compile the compiler for the host architecture. 190 # Only compile the compiler for the host architecture.
301 if (current_toolchain == host_toolchain) { 191 if (current_toolchain == host_toolchain) {
302 executable("protoc") { 192 executable("protoc") {
303 sources = [ 193 sources = [
304 "src/google/protobuf/compiler/code_generator.cc", 194 "src/google/protobuf/compiler/code_generator.cc",
305 "src/google/protobuf/compiler/code_generator.h",
306 "src/google/protobuf/compiler/command_line_interface.cc", 195 "src/google/protobuf/compiler/command_line_interface.cc",
307 "src/google/protobuf/compiler/command_line_interface.h",
308 "src/google/protobuf/compiler/cpp/cpp_enum.cc", 196 "src/google/protobuf/compiler/cpp/cpp_enum.cc",
309 "src/google/protobuf/compiler/cpp/cpp_enum.h", 197 "src/google/protobuf/compiler/cpp/cpp_enum.h",
310 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 198 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
311 "src/google/protobuf/compiler/cpp/cpp_enum_field.h", 199 "src/google/protobuf/compiler/cpp/cpp_enum_field.h",
312 "src/google/protobuf/compiler/cpp/cpp_extension.cc", 200 "src/google/protobuf/compiler/cpp/cpp_extension.cc",
313 "src/google/protobuf/compiler/cpp/cpp_extension.h", 201 "src/google/protobuf/compiler/cpp/cpp_extension.h",
314 "src/google/protobuf/compiler/cpp/cpp_field.cc", 202 "src/google/protobuf/compiler/cpp/cpp_field.cc",
315 "src/google/protobuf/compiler/cpp/cpp_field.h", 203 "src/google/protobuf/compiler/cpp/cpp_field.h",
316 "src/google/protobuf/compiler/cpp/cpp_file.cc", 204 "src/google/protobuf/compiler/cpp/cpp_file.cc",
317 "src/google/protobuf/compiler/cpp/cpp_file.h", 205 "src/google/protobuf/compiler/cpp/cpp_file.h",
318 "src/google/protobuf/compiler/cpp/cpp_generator.cc", 206 "src/google/protobuf/compiler/cpp/cpp_generator.cc",
319 "src/google/protobuf/compiler/cpp/cpp_generator.h",
320 "src/google/protobuf/compiler/cpp/cpp_helpers.cc", 207 "src/google/protobuf/compiler/cpp/cpp_helpers.cc",
321 "src/google/protobuf/compiler/cpp/cpp_helpers.h", 208 "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",
324 "src/google/protobuf/compiler/cpp/cpp_message.cc", 209 "src/google/protobuf/compiler/cpp/cpp_message.cc",
325 "src/google/protobuf/compiler/cpp/cpp_message.h", 210 "src/google/protobuf/compiler/cpp/cpp_message.h",
326 "src/google/protobuf/compiler/cpp/cpp_message_field.cc", 211 "src/google/protobuf/compiler/cpp/cpp_message_field.cc",
327 "src/google/protobuf/compiler/cpp/cpp_message_field.h", 212 "src/google/protobuf/compiler/cpp/cpp_message_field.h",
328 "src/google/protobuf/compiler/cpp/cpp_options.h",
329 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", 213 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
330 "src/google/protobuf/compiler/cpp/cpp_primitive_field.h", 214 "src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
331 "src/google/protobuf/compiler/cpp/cpp_service.cc", 215 "src/google/protobuf/compiler/cpp/cpp_service.cc",
332 "src/google/protobuf/compiler/cpp/cpp_service.h", 216 "src/google/protobuf/compiler/cpp/cpp_service.h",
333 "src/google/protobuf/compiler/cpp/cpp_string_field.cc", 217 "src/google/protobuf/compiler/cpp/cpp_string_field.cc",
334 "src/google/protobuf/compiler/cpp/cpp_string_field.h", 218 "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",
370 "src/google/protobuf/compiler/java/java_enum.cc", 219 "src/google/protobuf/compiler/java/java_enum.cc",
371 "src/google/protobuf/compiler/java/java_enum.h", 220 "src/google/protobuf/compiler/java/java_enum.h",
372 "src/google/protobuf/compiler/java/java_enum_field.cc", 221 "src/google/protobuf/compiler/java/java_enum_field.cc",
373 "src/google/protobuf/compiler/java/java_enum_field.h", 222 "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",
376 "src/google/protobuf/compiler/java/java_extension.cc", 223 "src/google/protobuf/compiler/java/java_extension.cc",
377 "src/google/protobuf/compiler/java/java_extension.h", 224 "src/google/protobuf/compiler/java/java_extension.h",
378 "src/google/protobuf/compiler/java/java_field.cc", 225 "src/google/protobuf/compiler/java/java_field.cc",
379 "src/google/protobuf/compiler/java/java_field.h", 226 "src/google/protobuf/compiler/java/java_field.h",
380 "src/google/protobuf/compiler/java/java_file.cc", 227 "src/google/protobuf/compiler/java/java_file.cc",
381 "src/google/protobuf/compiler/java/java_file.h", 228 "src/google/protobuf/compiler/java/java_file.h",
382 "src/google/protobuf/compiler/java/java_generator.cc", 229 "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",
386 "src/google/protobuf/compiler/java/java_helpers.cc", 230 "src/google/protobuf/compiler/java/java_helpers.cc",
387 "src/google/protobuf/compiler/java/java_helpers.h", 231 "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",
396 "src/google/protobuf/compiler/java/java_message.cc", 232 "src/google/protobuf/compiler/java/java_message.cc",
397 "src/google/protobuf/compiler/java/java_message.h", 233 "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",
402 "src/google/protobuf/compiler/java/java_message_field.cc", 234 "src/google/protobuf/compiler/java/java_message_field.cc",
403 "src/google/protobuf/compiler/java/java_message_field.h", 235 "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",
410 "src/google/protobuf/compiler/java/java_primitive_field.cc", 236 "src/google/protobuf/compiler/java/java_primitive_field.cc",
411 "src/google/protobuf/compiler/java/java_primitive_field.h", 237 "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",
414 "src/google/protobuf/compiler/java/java_service.cc", 238 "src/google/protobuf/compiler/java/java_service.cc",
415 "src/google/protobuf/compiler/java/java_service.h", 239 "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",
418 "src/google/protobuf/compiler/java/java_string_field.cc", 240 "src/google/protobuf/compiler/java/java_string_field.cc",
419 "src/google/protobuf/compiler/java/java_string_field.h", 241 "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",
445 "src/google/protobuf/compiler/main.cc", 242 "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",
470 "src/google/protobuf/compiler/plugin.cc", 243 "src/google/protobuf/compiler/plugin.cc",
471 "src/google/protobuf/compiler/plugin.h",
472 "src/google/protobuf/compiler/plugin.pb.cc", 244 "src/google/protobuf/compiler/plugin.pb.cc",
473 "src/google/protobuf/compiler/plugin.pb.h",
474 "src/google/protobuf/compiler/python/python_generator.cc", 245 "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",
478 "src/google/protobuf/compiler/subprocess.cc", 246 "src/google/protobuf/compiler/subprocess.cc",
479 "src/google/protobuf/compiler/subprocess.h", 247 "src/google/protobuf/compiler/subprocess.h",
480 "src/google/protobuf/compiler/zip_writer.cc", 248 "src/google/protobuf/compiler/zip_writer.cc",
481 "src/google/protobuf/compiler/zip_writer.h", 249 "src/google/protobuf/compiler/zip_writer.h",
482 ] 250 ]
483 251
484 configs -= [ "//build/config/compiler:chromium_code" ] 252 configs -= [ "//build/config/compiler:chromium_code" ]
485 configs += [ "//build/config/compiler:no_chromium_code" ] 253 configs += [ "//build/config/compiler:no_chromium_code" ]
486 if (is_win) { 254 if (is_win) {
487 # This is defined internally, don't warn on duplicate. 255 # This is defined internally, don't warn on duplicate.
488 configs -= [ "//build/config/win:lean_and_mean" ] 256 configs -= [ "//build/config/win:lean_and_mean" ]
489 } 257 }
490 258
491 cflags = protobuf_lite_cflags 259 cflags = protobuf_lite_cflags
492 260
493 deps = [ 261 deps = [
494 ":protobuf_full", 262 ":protobuf_full",
495 ] 263 ]
496 deps += [ "//build/config/sanitizers:deps" ] 264 deps += [ "//build/config/sanitizers:deps" ]
497 } 265 }
498 } 266 }
499 267
500 google_python_dir = "$root_out_dir/pyproto/google" 268 google_python_dir = "$root_out_dir/pyproto/google"
501 269
502 copy("copy_google") { 270 copy("copy_google") {
503 sources = [ 271 sources = [
504 "python/google/__init__.py", 272 "__init__.py",
505 ] 273 ]
506 outputs = [ 274 outputs = [
507 "$google_python_dir/{{source_file_part}}", 275 "$google_python_dir/{{source_file_part}}",
508 ] 276 ]
509 } 277 }
510 278
511 copy("copy_google_protobuf") { 279 copy("copy_google_protobuf") {
512 sources = [ 280 sources = [
513 "python/google/protobuf/__init__.py", 281 "python/google/protobuf/__init__.py",
514 "python/google/protobuf/descriptor.py", 282 "python/google/protobuf/descriptor.py",
515 "python/google/protobuf/descriptor_database.py", 283 "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",
523 "python/google/protobuf/descriptor_pool.py", 284 "python/google/protobuf/descriptor_pool.py",
524 "python/google/protobuf/message.py", 285 "python/google/protobuf/message.py",
525 "python/google/protobuf/message_factory.py", 286 "python/google/protobuf/message_factory.py",
526 "python/google/protobuf/proto_builder.py",
527 "python/google/protobuf/reflection.py", 287 "python/google/protobuf/reflection.py",
528 "python/google/protobuf/service.py", 288 "python/google/protobuf/service.py",
529 "python/google/protobuf/service_reflection.py", 289 "python/google/protobuf/service_reflection.py",
530 "python/google/protobuf/symbol_database.py",
531 "python/google/protobuf/text_encoding.py",
532 "python/google/protobuf/text_format.py", 290 "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",
533 ] 301 ]
534 outputs = [ 302 outputs = [
535 "$google_python_dir/protobuf/{{source_file_part}}", 303 "$google_python_dir/protobuf/{{source_file_part}}",
536 ] 304 ]
537 } 305 }
538 306
539 copy("copy_google_protobuf_internal") { 307 copy("copy_google_protobuf_internal") {
540 sources = [ 308 sources = [
541 "python/google/protobuf/internal/__init__.py", 309 "python/google/protobuf/internal/__init__.py",
542 "python/google/protobuf/internal/api_implementation.py", 310 "python/google/protobuf/internal/api_implementation.py",
543 "python/google/protobuf/internal/containers.py", 311 "python/google/protobuf/internal/containers.py",
312 "python/google/protobuf/internal/cpp_message.py",
544 "python/google/protobuf/internal/decoder.py", 313 "python/google/protobuf/internal/decoder.py",
545 "python/google/protobuf/internal/encoder.py", 314 "python/google/protobuf/internal/encoder.py",
546 "python/google/protobuf/internal/enum_type_wrapper.py", 315 "python/google/protobuf/internal/enum_type_wrapper.py",
547 "python/google/protobuf/internal/generator_test.py", 316 "python/google/protobuf/internal/generator_test.py",
548 "python/google/protobuf/internal/message_listener.py", 317 "python/google/protobuf/internal/message_listener.py",
549 "python/google/protobuf/internal/python_message.py", 318 "python/google/protobuf/internal/python_message.py",
550 "python/google/protobuf/internal/type_checkers.py", 319 "python/google/protobuf/internal/type_checkers.py",
551 "python/google/protobuf/internal/wire_format.py", 320 "python/google/protobuf/internal/wire_format.py",
552 ] 321 ]
553 outputs = [ 322 outputs = [
554 "$google_python_dir/protobuf/internal/{{source_file_part}}", 323 "$google_python_dir/protobuf/internal/{{source_file_part}}",
555 ] 324 ]
556 } 325 }
557 326
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
568 group("py_proto") { 327 group("py_proto") {
569 public_deps = [ 328 public_deps = [
570 ":copy_google", 329 ":copy_google",
571 ":copy_google_protobuf", 330 ":copy_google_protobuf",
572 ":copy_google_protobuf_internal", 331 ":copy_google_protobuf_internal",
573 ] 332 ]
574 333
575 # Targets that depend on this should depend on the copied data files. 334 # Targets that depend on this should depend on the copied data files.
576 data = get_target_outputs(":copy_google") 335 data = get_target_outputs(":copy_google")
577 data += get_target_outputs(":copy_google_protobuf") 336 data += get_target_outputs(":copy_google_protobuf")
578 data += get_target_outputs(":copy_google_protobuf_internal") 337 data += get_target_outputs(":copy_google_protobuf_internal")
579 } 338 }
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