| OLD | NEW |
| (Empty) | |
| 1 diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn |
| 2 new file mode 100644 |
| 3 index 0000000..e796f1f |
| 4 --- /dev/null |
| 5 +++ b/third_party/protobuf/BUILD.gn |
| 6 @@ -0,0 +1,561 @@ |
| 7 +# Copyright 2014 The Chromium Authors. All rights reserved. |
| 8 +# Use of this source code is governed by a BSD-style license that can be |
| 9 +# found in the LICENSE file. |
| 10 + |
| 11 +config("protobuf_config") { |
| 12 + include_dirs = [ "src" ] |
| 13 + defines = [ |
| 14 + "GOOGLE_PROTOBUF_NO_RTTI", |
| 15 + "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", |
| 16 + ] |
| 17 +} |
| 18 + |
| 19 +# This config should be applied to targets using generated code from the proto |
| 20 +# compiler. It sets up the include directories properly. |
| 21 +config("using_proto") { |
| 22 + include_dirs = [ |
| 23 + "src", |
| 24 + "$root_gen_dir/protoc_out", |
| 25 + ] |
| 26 +} |
| 27 + |
| 28 +protobuf_lite_sources = [ |
| 29 + "src/google/protobuf/arena.cc", |
| 30 + "src/google/protobuf/arena.h", |
| 31 + "src/google/protobuf/arenastring.cc", |
| 32 + "src/google/protobuf/arenastring.h", |
| 33 + "src/google/protobuf/descriptor.h", |
| 34 + "src/google/protobuf/descriptor.pb.h", |
| 35 + "src/google/protobuf/extension_set.cc", |
| 36 + "src/google/protobuf/extension_set.h", |
| 37 + "src/google/protobuf/generated_enum_reflection.h", |
| 38 + "src/google/protobuf/generated_enum_util.h", |
| 39 + "src/google/protobuf/generated_message_util.cc", |
| 40 + "src/google/protobuf/generated_message_util.h", |
| 41 + "src/google/protobuf/io/coded_stream.cc", |
| 42 + "src/google/protobuf/io/coded_stream.h", |
| 43 + "src/google/protobuf/io/coded_stream_inl.h", |
| 44 + "src/google/protobuf/io/zero_copy_stream.cc", |
| 45 + "src/google/protobuf/io/zero_copy_stream.h", |
| 46 + "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", |
| 47 + "src/google/protobuf/io/zero_copy_stream_impl_lite.h", |
| 48 + "src/google/protobuf/message.h", |
| 49 + "src/google/protobuf/message_lite.cc", |
| 50 + "src/google/protobuf/message_lite.h", |
| 51 + "src/google/protobuf/metadata.h", |
| 52 + "src/google/protobuf/repeated_field.cc", |
| 53 + "src/google/protobuf/repeated_field.h", |
| 54 + "src/google/protobuf/stubs/atomic_sequence_num.h", |
| 55 + "src/google/protobuf/stubs/atomicops.h", |
| 56 + "src/google/protobuf/stubs/atomicops_internals_aix.h", |
| 57 + "src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h", |
| 58 + "src/google/protobuf/stubs/atomicops_internals_arm_gcc.h", |
| 59 + "src/google/protobuf/stubs/atomicops_internals_arm_qnx.h", |
| 60 + "src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h", |
| 61 + "src/google/protobuf/stubs/atomicops_internals_generic_gcc.h", |
| 62 + "src/google/protobuf/stubs/atomicops_internals_macosx.h", |
| 63 + "src/google/protobuf/stubs/atomicops_internals_mips_gcc.h", |
| 64 + "src/google/protobuf/stubs/atomicops_internals_pnacl.h", |
| 65 + "src/google/protobuf/stubs/atomicops_internals_solaris.h", |
| 66 + "src/google/protobuf/stubs/atomicops_internals_tsan.h", |
| 67 + "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc", |
| 68 + "src/google/protobuf/stubs/atomicops_internals_x86_gcc.h", |
| 69 + "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", |
| 70 + "src/google/protobuf/stubs/atomicops_internals_x86_msvc.h", |
| 71 + "src/google/protobuf/stubs/bytestream.cc", |
| 72 + "src/google/protobuf/stubs/bytestream.h", |
| 73 + "src/google/protobuf/stubs/callback.h", |
| 74 + "src/google/protobuf/stubs/casts.h", |
| 75 + "src/google/protobuf/stubs/common.cc", |
| 76 + "src/google/protobuf/stubs/common.h", |
| 77 + "src/google/protobuf/stubs/fastmem.h", |
| 78 + "src/google/protobuf/stubs/hash.h", |
| 79 + "src/google/protobuf/stubs/logging.h", |
| 80 + "src/google/protobuf/stubs/macros.h", |
| 81 + "src/google/protobuf/stubs/map_util.h", |
| 82 + "src/google/protobuf/stubs/mathlimits.h", |
| 83 + "src/google/protobuf/stubs/mutex.h", |
| 84 + "src/google/protobuf/stubs/once.cc", |
| 85 + "src/google/protobuf/stubs/once.h", |
| 86 + "src/google/protobuf/stubs/platform_macros.h", |
| 87 + "src/google/protobuf/stubs/port.h", |
| 88 + "src/google/protobuf/stubs/scoped_ptr.h", |
| 89 + "src/google/protobuf/stubs/status.cc", |
| 90 + "src/google/protobuf/stubs/status.h", |
| 91 + "src/google/protobuf/stubs/statusor.cc", |
| 92 + "src/google/protobuf/stubs/statusor.h", |
| 93 + "src/google/protobuf/stubs/stl_util.h", |
| 94 + "src/google/protobuf/stubs/stringpiece.cc", |
| 95 + "src/google/protobuf/stubs/stringpiece.h", |
| 96 + "src/google/protobuf/stubs/stringprintf.cc", |
| 97 + "src/google/protobuf/stubs/stringprintf.h", |
| 98 + "src/google/protobuf/stubs/strutil.cc", |
| 99 + "src/google/protobuf/stubs/strutil.h", |
| 100 + "src/google/protobuf/stubs/template_util.h", |
| 101 + "src/google/protobuf/stubs/time.cc", |
| 102 + "src/google/protobuf/stubs/time.h", |
| 103 + "src/google/protobuf/stubs/type_traits.h", |
| 104 + "src/google/protobuf/testing/googletest.h", |
| 105 + "src/google/protobuf/unknown_field_set.h", |
| 106 + "src/google/protobuf/wire_format_lite.cc", |
| 107 + "src/google/protobuf/wire_format_lite.h", |
| 108 + "src/google/protobuf/wire_format_lite_inl.h", |
| 109 +] |
| 110 + |
| 111 +protobuf_lite_cflags = [] |
| 112 +if (is_win) { |
| 113 + protobuf_lite_cflags = [ |
| 114 + "/wd4018", # Signed/unsigned mismatch in comparison. |
| 115 + "/wd4065", # Switch statement contains 'default' but no 'case' labels |
| 116 + "/wd4146", # Unary minus operator applied to unsigned type |
| 117 + "/wd4244", # Implicit conversion, possible loss of data. |
| 118 + "/wd4267", # Size_t to int truncation. |
| 119 + "/wd4291", # No matching operator delete for a placement new. |
| 120 + "/wd4355", # 'this' used in base member initializer list. |
| 121 + "/wd4506", # No definition for inline function. |
| 122 + ] |
| 123 +} |
| 124 + |
| 125 +source_set("protobuf_lite") { |
| 126 + sources = protobuf_lite_sources |
| 127 + |
| 128 + configs -= [ "//build/config/compiler:chromium_code" ] |
| 129 + configs += [ "//build/config/compiler:no_chromium_code" ] |
| 130 + if (is_win) { |
| 131 + configs -= [ "//build/config/win:lean_and_mean" ] |
| 132 + } |
| 133 + public_configs = [ |
| 134 + ":protobuf_config", |
| 135 + |
| 136 + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 137 + "//build/config/compiler:no_size_t_to_int_warning", |
| 138 + ] |
| 139 + |
| 140 + cflags = protobuf_lite_cflags |
| 141 +} |
| 142 + |
| 143 +# This is the full, heavy protobuf lib that's needed for c++ .protos that don't |
| 144 +# specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls |
| 145 +# into that category. Do not use in Chrome code. |
| 146 + |
| 147 +source_set("protobuf_full") { |
| 148 + # Prevent people from depending on this outside our file. |
| 149 + visibility = [ ":*" ] |
| 150 + |
| 151 + sources = [ |
| 152 + "src/google/protobuf/any.cc", |
| 153 + "src/google/protobuf/any.h", |
| 154 + "src/google/protobuf/any.pb.cc", |
| 155 + "src/google/protobuf/any.pb.h", |
| 156 + "src/google/protobuf/api.pb.cc", |
| 157 + "src/google/protobuf/api.pb.h", |
| 158 + "src/google/protobuf/compiler/importer.cc", |
| 159 + "src/google/protobuf/compiler/importer.h", |
| 160 + "src/google/protobuf/compiler/parser.cc", |
| 161 + "src/google/protobuf/compiler/parser.h", |
| 162 + "src/google/protobuf/descriptor.cc", |
| 163 + "src/google/protobuf/descriptor.pb.cc", |
| 164 + "src/google/protobuf/descriptor_database.cc", |
| 165 + "src/google/protobuf/descriptor_database.h", |
| 166 + "src/google/protobuf/duration.pb.cc", |
| 167 + "src/google/protobuf/duration.pb.h", |
| 168 + "src/google/protobuf/dynamic_message.cc", |
| 169 + "src/google/protobuf/dynamic_message.h", |
| 170 + "src/google/protobuf/empty.pb.cc", |
| 171 + "src/google/protobuf/empty.pb.h", |
| 172 + "src/google/protobuf/extension_set_heavy.cc", |
| 173 + "src/google/protobuf/field_mask.pb.cc", |
| 174 + "src/google/protobuf/field_mask.pb.h", |
| 175 + "src/google/protobuf/generated_message_reflection.cc", |
| 176 + "src/google/protobuf/generated_message_reflection.h", |
| 177 + |
| 178 + # gzip_stream.cc pulls in zlib, but it's not actually used by protoc, just |
| 179 + # by test code; so instead of compiling zlib for the host, let's just |
| 180 + # exclude these. |
| 181 + # "src/google/protobuf/io/gzip_stream.cc", |
| 182 + # "src/google/protobuf/io/gzip_stream.h", |
| 183 + "src/google/protobuf/io/printer.cc", |
| 184 + "src/google/protobuf/io/printer.h", |
| 185 + "src/google/protobuf/io/strtod.cc", |
| 186 + "src/google/protobuf/io/strtod.h", |
| 187 + "src/google/protobuf/io/tokenizer.cc", |
| 188 + "src/google/protobuf/io/tokenizer.h", |
| 189 + "src/google/protobuf/io/zero_copy_stream_impl.cc", |
| 190 + "src/google/protobuf/io/zero_copy_stream_impl.h", |
| 191 + "src/google/protobuf/map.h", |
| 192 + "src/google/protobuf/map_entry_lite.h", |
| 193 + "src/google/protobuf/map_field.cc", |
| 194 + "src/google/protobuf/map_field.h", |
| 195 + "src/google/protobuf/map_field_inl.h", |
| 196 + "src/google/protobuf/map_field_lite.h", |
| 197 + "src/google/protobuf/map_type_handler.h", |
| 198 + "src/google/protobuf/message.cc", |
| 199 + "src/google/protobuf/reflection_ops.cc", |
| 200 + "src/google/protobuf/reflection_ops.h", |
| 201 + "src/google/protobuf/service.cc", |
| 202 + "src/google/protobuf/service.h", |
| 203 + "src/google/protobuf/source_context.pb.cc", |
| 204 + "src/google/protobuf/source_context.pb.h", |
| 205 + "src/google/protobuf/struct.pb.cc", |
| 206 + "src/google/protobuf/struct.pb.h", |
| 207 + "src/google/protobuf/stubs/mathlimits.cc", |
| 208 + "src/google/protobuf/stubs/mathutil.h", |
| 209 + "src/google/protobuf/stubs/shared_ptr.h", |
| 210 + "src/google/protobuf/stubs/singleton.h", |
| 211 + "src/google/protobuf/stubs/status_macros.h", |
| 212 + "src/google/protobuf/stubs/structurally_valid.cc", |
| 213 + "src/google/protobuf/stubs/substitute.cc", |
| 214 + "src/google/protobuf/stubs/substitute.h", |
| 215 + "src/google/protobuf/text_format.cc", |
| 216 + "src/google/protobuf/text_format.h", |
| 217 + "src/google/protobuf/timestamp.pb.cc", |
| 218 + "src/google/protobuf/timestamp.pb.h", |
| 219 + "src/google/protobuf/type.pb.cc", |
| 220 + "src/google/protobuf/type.pb.h", |
| 221 + "src/google/protobuf/unknown_field_set.cc", |
| 222 + "src/google/protobuf/util/field_comparator.cc", |
| 223 + "src/google/protobuf/util/field_comparator.h", |
| 224 + "src/google/protobuf/util/internal/constants.h", |
| 225 + "src/google/protobuf/util/internal/datapiece.cc", |
| 226 + "src/google/protobuf/util/internal/datapiece.h", |
| 227 + "src/google/protobuf/util/internal/default_value_objectwriter.cc", |
| 228 + "src/google/protobuf/util/internal/default_value_objectwriter.h", |
| 229 + "src/google/protobuf/util/internal/error_listener.cc", |
| 230 + "src/google/protobuf/util/internal/error_listener.h", |
| 231 + "src/google/protobuf/util/internal/field_mask_utility.cc", |
| 232 + "src/google/protobuf/util/internal/field_mask_utility.h", |
| 233 + "src/google/protobuf/util/internal/json_escaping.cc", |
| 234 + "src/google/protobuf/util/internal/json_escaping.h", |
| 235 + "src/google/protobuf/util/internal/json_objectwriter.cc", |
| 236 + "src/google/protobuf/util/internal/json_objectwriter.h", |
| 237 + "src/google/protobuf/util/internal/json_stream_parser.cc", |
| 238 + "src/google/protobuf/util/internal/json_stream_parser.h", |
| 239 + "src/google/protobuf/util/internal/location_tracker.h", |
| 240 + "src/google/protobuf/util/internal/object_location_tracker.h", |
| 241 + "src/google/protobuf/util/internal/object_source.h", |
| 242 + "src/google/protobuf/util/internal/object_writer.cc", |
| 243 + "src/google/protobuf/util/internal/object_writer.h", |
| 244 + "src/google/protobuf/util/internal/protostream_objectsource.cc", |
| 245 + "src/google/protobuf/util/internal/protostream_objectsource.h", |
| 246 + "src/google/protobuf/util/internal/protostream_objectwriter.cc", |
| 247 + "src/google/protobuf/util/internal/protostream_objectwriter.h", |
| 248 + "src/google/protobuf/util/internal/snake2camel_objectwriter.h", |
| 249 + "src/google/protobuf/util/internal/structured_objectwriter.h", |
| 250 + "src/google/protobuf/util/internal/type_info.cc", |
| 251 + "src/google/protobuf/util/internal/type_info.h", |
| 252 + "src/google/protobuf/util/internal/type_info_test_helper.cc", |
| 253 + "src/google/protobuf/util/internal/type_info_test_helper.h", |
| 254 + "src/google/protobuf/util/internal/utility.cc", |
| 255 + "src/google/protobuf/util/internal/utility.h", |
| 256 + "src/google/protobuf/util/json_util.cc", |
| 257 + "src/google/protobuf/util/json_util.h", |
| 258 + "src/google/protobuf/util/message_differencer.cc", |
| 259 + "src/google/protobuf/util/message_differencer.h", |
| 260 + "src/google/protobuf/util/type_resolver.h", |
| 261 + "src/google/protobuf/util/type_resolver_util.cc", |
| 262 + "src/google/protobuf/util/type_resolver_util.h", |
| 263 + "src/google/protobuf/wire_format.cc", |
| 264 + "src/google/protobuf/wire_format.h", |
| 265 + "src/google/protobuf/wrappers.pb.cc", |
| 266 + "src/google/protobuf/wrappers.pb.h", |
| 267 + ] |
| 268 + |
| 269 + configs -= [ "//build/config/compiler:chromium_code" ] |
| 270 + configs += [ "//build/config/compiler:no_chromium_code" ] |
| 271 + if (is_win) { |
| 272 + configs -= [ "//build/config/win:lean_and_mean" ] |
| 273 + } |
| 274 + public_configs = [ |
| 275 + ":protobuf_config", |
| 276 + |
| 277 + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 278 + "//build/config/compiler:no_size_t_to_int_warning", |
| 279 + ] |
| 280 + |
| 281 + cflags = protobuf_lite_cflags |
| 282 + |
| 283 + deps = [ |
| 284 + ":protobuf_lite", |
| 285 + ] |
| 286 +} |
| 287 + |
| 288 +# Only compile the compiler for the host architecture. |
| 289 +if (current_toolchain == host_toolchain) { |
| 290 + executable("protoc") { |
| 291 + sources = [ |
| 292 + "src/google/protobuf/compiler/code_generator.cc", |
| 293 + "src/google/protobuf/compiler/code_generator.h", |
| 294 + "src/google/protobuf/compiler/command_line_interface.cc", |
| 295 + "src/google/protobuf/compiler/command_line_interface.h", |
| 296 + "src/google/protobuf/compiler/cpp/cpp_enum.cc", |
| 297 + "src/google/protobuf/compiler/cpp/cpp_enum.h", |
| 298 + "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", |
| 299 + "src/google/protobuf/compiler/cpp/cpp_enum_field.h", |
| 300 + "src/google/protobuf/compiler/cpp/cpp_extension.cc", |
| 301 + "src/google/protobuf/compiler/cpp/cpp_extension.h", |
| 302 + "src/google/protobuf/compiler/cpp/cpp_field.cc", |
| 303 + "src/google/protobuf/compiler/cpp/cpp_field.h", |
| 304 + "src/google/protobuf/compiler/cpp/cpp_file.cc", |
| 305 + "src/google/protobuf/compiler/cpp/cpp_file.h", |
| 306 + "src/google/protobuf/compiler/cpp/cpp_generator.cc", |
| 307 + "src/google/protobuf/compiler/cpp/cpp_generator.h", |
| 308 + "src/google/protobuf/compiler/cpp/cpp_helpers.cc", |
| 309 + "src/google/protobuf/compiler/cpp/cpp_helpers.h", |
| 310 + "src/google/protobuf/compiler/cpp/cpp_map_field.cc", |
| 311 + "src/google/protobuf/compiler/cpp/cpp_map_field.h", |
| 312 + "src/google/protobuf/compiler/cpp/cpp_message.cc", |
| 313 + "src/google/protobuf/compiler/cpp/cpp_message.h", |
| 314 + "src/google/protobuf/compiler/cpp/cpp_message_field.cc", |
| 315 + "src/google/protobuf/compiler/cpp/cpp_message_field.h", |
| 316 + "src/google/protobuf/compiler/cpp/cpp_options.h", |
| 317 + "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", |
| 318 + "src/google/protobuf/compiler/cpp/cpp_primitive_field.h", |
| 319 + "src/google/protobuf/compiler/cpp/cpp_service.cc", |
| 320 + "src/google/protobuf/compiler/cpp/cpp_service.h", |
| 321 + "src/google/protobuf/compiler/cpp/cpp_string_field.cc", |
| 322 + "src/google/protobuf/compiler/cpp/cpp_string_field.h", |
| 323 + "src/google/protobuf/compiler/csharp/csharp_enum.cc", |
| 324 + "src/google/protobuf/compiler/csharp/csharp_enum.h", |
| 325 + "src/google/protobuf/compiler/csharp/csharp_enum_field.cc", |
| 326 + "src/google/protobuf/compiler/csharp/csharp_enum_field.h", |
| 327 + "src/google/protobuf/compiler/csharp/csharp_field_base.cc", |
| 328 + "src/google/protobuf/compiler/csharp/csharp_field_base.h", |
| 329 + "src/google/protobuf/compiler/csharp/csharp_generator.cc", |
| 330 + "src/google/protobuf/compiler/csharp/csharp_generator.h", |
| 331 + "src/google/protobuf/compiler/csharp/csharp_helpers.cc", |
| 332 + "src/google/protobuf/compiler/csharp/csharp_helpers.h", |
| 333 + "src/google/protobuf/compiler/csharp/csharp_map_field.cc", |
| 334 + "src/google/protobuf/compiler/csharp/csharp_map_field.h", |
| 335 + "src/google/protobuf/compiler/csharp/csharp_message.cc", |
| 336 + "src/google/protobuf/compiler/csharp/csharp_message.h", |
| 337 + "src/google/protobuf/compiler/csharp/csharp_message_field.cc", |
| 338 + "src/google/protobuf/compiler/csharp/csharp_message_field.h", |
| 339 + "src/google/protobuf/compiler/csharp/csharp_names.h", |
| 340 + "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", |
| 341 + "src/google/protobuf/compiler/csharp/csharp_primitive_field.h", |
| 342 + "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", |
| 343 + "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h", |
| 344 + "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", |
| 345 + "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h", |
| 346 + "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", |
| 347 + "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h", |
| 348 + "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", |
| 349 + "src/google/protobuf/compiler/csharp/csharp_source_generator_base.h", |
| 350 + "src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc", |
| 351 + "src/google/protobuf/compiler/csharp/csharp_umbrella_class.h", |
| 352 + "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", |
| 353 + "src/google/protobuf/compiler/csharp/csharp_wrapper_field.h", |
| 354 + "src/google/protobuf/compiler/java/java_context.cc", |
| 355 + "src/google/protobuf/compiler/java/java_context.h", |
| 356 + "src/google/protobuf/compiler/java/java_doc_comment.cc", |
| 357 + "src/google/protobuf/compiler/java/java_doc_comment.h", |
| 358 + "src/google/protobuf/compiler/java/java_enum.cc", |
| 359 + "src/google/protobuf/compiler/java/java_enum.h", |
| 360 + "src/google/protobuf/compiler/java/java_enum_field.cc", |
| 361 + "src/google/protobuf/compiler/java/java_enum_field.h", |
| 362 + "src/google/protobuf/compiler/java/java_enum_field_lite.cc", |
| 363 + "src/google/protobuf/compiler/java/java_enum_field_lite.h", |
| 364 + "src/google/protobuf/compiler/java/java_extension.cc", |
| 365 + "src/google/protobuf/compiler/java/java_extension.h", |
| 366 + "src/google/protobuf/compiler/java/java_field.cc", |
| 367 + "src/google/protobuf/compiler/java/java_field.h", |
| 368 + "src/google/protobuf/compiler/java/java_file.cc", |
| 369 + "src/google/protobuf/compiler/java/java_file.h", |
| 370 + "src/google/protobuf/compiler/java/java_generator.cc", |
| 371 + "src/google/protobuf/compiler/java/java_generator.h", |
| 372 + "src/google/protobuf/compiler/java/java_generator_factory.cc", |
| 373 + "src/google/protobuf/compiler/java/java_generator_factory.h", |
| 374 + "src/google/protobuf/compiler/java/java_helpers.cc", |
| 375 + "src/google/protobuf/compiler/java/java_helpers.h", |
| 376 + "src/google/protobuf/compiler/java/java_lazy_message_field.cc", |
| 377 + "src/google/protobuf/compiler/java/java_lazy_message_field.h", |
| 378 + "src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc", |
| 379 + "src/google/protobuf/compiler/java/java_lazy_message_field_lite.h", |
| 380 + "src/google/protobuf/compiler/java/java_map_field.cc", |
| 381 + "src/google/protobuf/compiler/java/java_map_field.h", |
| 382 + "src/google/protobuf/compiler/java/java_map_field_lite.cc", |
| 383 + "src/google/protobuf/compiler/java/java_map_field_lite.h", |
| 384 + "src/google/protobuf/compiler/java/java_message.cc", |
| 385 + "src/google/protobuf/compiler/java/java_message.h", |
| 386 + "src/google/protobuf/compiler/java/java_message_builder.cc", |
| 387 + "src/google/protobuf/compiler/java/java_message_builder.h", |
| 388 + "src/google/protobuf/compiler/java/java_message_builder_lite.cc", |
| 389 + "src/google/protobuf/compiler/java/java_message_builder_lite.h", |
| 390 + "src/google/protobuf/compiler/java/java_message_field.cc", |
| 391 + "src/google/protobuf/compiler/java/java_message_field.h", |
| 392 + "src/google/protobuf/compiler/java/java_message_field_lite.cc", |
| 393 + "src/google/protobuf/compiler/java/java_message_field_lite.h", |
| 394 + "src/google/protobuf/compiler/java/java_message_lite.cc", |
| 395 + "src/google/protobuf/compiler/java/java_message_lite.h", |
| 396 + "src/google/protobuf/compiler/java/java_name_resolver.cc", |
| 397 + "src/google/protobuf/compiler/java/java_name_resolver.h", |
| 398 + "src/google/protobuf/compiler/java/java_primitive_field.cc", |
| 399 + "src/google/protobuf/compiler/java/java_primitive_field.h", |
| 400 + "src/google/protobuf/compiler/java/java_primitive_field_lite.cc", |
| 401 + "src/google/protobuf/compiler/java/java_primitive_field_lite.h", |
| 402 + "src/google/protobuf/compiler/java/java_service.cc", |
| 403 + "src/google/protobuf/compiler/java/java_service.h", |
| 404 + "src/google/protobuf/compiler/java/java_shared_code_generator.cc", |
| 405 + "src/google/protobuf/compiler/java/java_shared_code_generator.h", |
| 406 + "src/google/protobuf/compiler/java/java_string_field.cc", |
| 407 + "src/google/protobuf/compiler/java/java_string_field.h", |
| 408 + "src/google/protobuf/compiler/java/java_string_field_lite.cc", |
| 409 + "src/google/protobuf/compiler/java/java_string_field_lite.h", |
| 410 + "src/google/protobuf/compiler/javanano/javanano_enum.cc", |
| 411 + "src/google/protobuf/compiler/javanano/javanano_enum.h", |
| 412 + "src/google/protobuf/compiler/javanano/javanano_enum_field.cc", |
| 413 + "src/google/protobuf/compiler/javanano/javanano_enum_field.h", |
| 414 + "src/google/protobuf/compiler/javanano/javanano_extension.cc", |
| 415 + "src/google/protobuf/compiler/javanano/javanano_extension.h", |
| 416 + "src/google/protobuf/compiler/javanano/javanano_field.cc", |
| 417 + "src/google/protobuf/compiler/javanano/javanano_field.h", |
| 418 + "src/google/protobuf/compiler/javanano/javanano_file.cc", |
| 419 + "src/google/protobuf/compiler/javanano/javanano_file.h", |
| 420 + "src/google/protobuf/compiler/javanano/javanano_generator.cc", |
| 421 + "src/google/protobuf/compiler/javanano/javanano_generator.h", |
| 422 + "src/google/protobuf/compiler/javanano/javanano_helpers.cc", |
| 423 + "src/google/protobuf/compiler/javanano/javanano_helpers.h", |
| 424 + "src/google/protobuf/compiler/javanano/javanano_map_field.cc", |
| 425 + "src/google/protobuf/compiler/javanano/javanano_map_field.h", |
| 426 + "src/google/protobuf/compiler/javanano/javanano_message.cc", |
| 427 + "src/google/protobuf/compiler/javanano/javanano_message.h", |
| 428 + "src/google/protobuf/compiler/javanano/javanano_message_field.cc", |
| 429 + "src/google/protobuf/compiler/javanano/javanano_message_field.h", |
| 430 + "src/google/protobuf/compiler/javanano/javanano_params.h", |
| 431 + "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc", |
| 432 + "src/google/protobuf/compiler/javanano/javanano_primitive_field.h", |
| 433 + "src/google/protobuf/compiler/main.cc", |
| 434 + "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", |
| 435 + "src/google/protobuf/compiler/objectivec/objectivec_enum.h", |
| 436 + "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", |
| 437 + "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h", |
| 438 + "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", |
| 439 + "src/google/protobuf/compiler/objectivec/objectivec_extension.h", |
| 440 + "src/google/protobuf/compiler/objectivec/objectivec_field.cc", |
| 441 + "src/google/protobuf/compiler/objectivec/objectivec_field.h", |
| 442 + "src/google/protobuf/compiler/objectivec/objectivec_file.cc", |
| 443 + "src/google/protobuf/compiler/objectivec/objectivec_file.h", |
| 444 + "src/google/protobuf/compiler/objectivec/objectivec_generator.cc", |
| 445 + "src/google/protobuf/compiler/objectivec/objectivec_generator.h", |
| 446 + "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", |
| 447 + "src/google/protobuf/compiler/objectivec/objectivec_helpers.h", |
| 448 + "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", |
| 449 + "src/google/protobuf/compiler/objectivec/objectivec_map_field.h", |
| 450 + "src/google/protobuf/compiler/objectivec/objectivec_message.cc", |
| 451 + "src/google/protobuf/compiler/objectivec/objectivec_message.h", |
| 452 + "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", |
| 453 + "src/google/protobuf/compiler/objectivec/objectivec_message_field.h", |
| 454 + "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", |
| 455 + "src/google/protobuf/compiler/objectivec/objectivec_oneof.h", |
| 456 + "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", |
| 457 + "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h", |
| 458 + "src/google/protobuf/compiler/plugin.cc", |
| 459 + "src/google/protobuf/compiler/plugin.h", |
| 460 + "src/google/protobuf/compiler/plugin.pb.cc", |
| 461 + "src/google/protobuf/compiler/plugin.pb.h", |
| 462 + "src/google/protobuf/compiler/python/python_generator.cc", |
| 463 + "src/google/protobuf/compiler/python/python_generator.h", |
| 464 + "src/google/protobuf/compiler/ruby/ruby_generator.cc", |
| 465 + "src/google/protobuf/compiler/ruby/ruby_generator.h", |
| 466 + "src/google/protobuf/compiler/subprocess.cc", |
| 467 + "src/google/protobuf/compiler/subprocess.h", |
| 468 + "src/google/protobuf/compiler/zip_writer.cc", |
| 469 + "src/google/protobuf/compiler/zip_writer.h", |
| 470 + ] |
| 471 + |
| 472 + configs -= [ "//build/config/compiler:chromium_code" ] |
| 473 + configs += [ "//build/config/compiler:no_chromium_code" ] |
| 474 + if (is_win) { |
| 475 + # This is defined internally, don't warn on duplicate. |
| 476 + configs -= [ "//build/config/win:lean_and_mean" ] |
| 477 + } |
| 478 + |
| 479 + cflags = protobuf_lite_cflags |
| 480 + |
| 481 + deps = [ |
| 482 + ":protobuf_full", |
| 483 + ] |
| 484 + deps += [ "//build/config/sanitizers:deps" ] |
| 485 + } |
| 486 +} |
| 487 + |
| 488 +google_python_dir = "$root_out_dir/pyproto/google" |
| 489 + |
| 490 +copy("copy_google") { |
| 491 + sources = [ |
| 492 + "python/google/__init__.py", |
| 493 + ] |
| 494 + outputs = [ |
| 495 + "$google_python_dir/{{source_file_part}}", |
| 496 + ] |
| 497 +} |
| 498 + |
| 499 +copy("copy_google_protobuf") { |
| 500 + sources = [ |
| 501 + "python/google/protobuf/__init__.py", |
| 502 + "python/google/protobuf/descriptor.py", |
| 503 + "python/google/protobuf/descriptor_database.py", |
| 504 + |
| 505 + # TODO(ncarter): protoc's python generator treats descriptor.proto |
| 506 + # specially, but only when the input path is exactly |
| 507 + # "google/protobuf/descriptor.proto". I'm not sure how to execute a rule |
| 508 + # from a different directory. For now, use a manually-generated copy of |
| 509 + # descriptor_pb2.py. |
| 510 + "python/google/protobuf/descriptor_pb2.py", |
| 511 + "python/google/protobuf/descriptor_pool.py", |
| 512 + "python/google/protobuf/message.py", |
| 513 + "python/google/protobuf/message_factory.py", |
| 514 + "python/google/protobuf/proto_builder.py", |
| 515 + "python/google/protobuf/reflection.py", |
| 516 + "python/google/protobuf/service.py", |
| 517 + "python/google/protobuf/service_reflection.py", |
| 518 + "python/google/protobuf/symbol_database.py", |
| 519 + "python/google/protobuf/text_encoding.py", |
| 520 + "python/google/protobuf/text_format.py", |
| 521 + ] |
| 522 + outputs = [ |
| 523 + "$google_python_dir/protobuf/{{source_file_part}}", |
| 524 + ] |
| 525 +} |
| 526 + |
| 527 +copy("copy_google_protobuf_internal") { |
| 528 + sources = [ |
| 529 + "python/google/protobuf/internal/__init__.py", |
| 530 + "python/google/protobuf/internal/api_implementation.py", |
| 531 + "python/google/protobuf/internal/containers.py", |
| 532 + "python/google/protobuf/internal/decoder.py", |
| 533 + "python/google/protobuf/internal/encoder.py", |
| 534 + "python/google/protobuf/internal/enum_type_wrapper.py", |
| 535 + "python/google/protobuf/internal/generator_test.py", |
| 536 + "python/google/protobuf/internal/message_listener.py", |
| 537 + "python/google/protobuf/internal/python_message.py", |
| 538 + "python/google/protobuf/internal/type_checkers.py", |
| 539 + "python/google/protobuf/internal/wire_format.py", |
| 540 + ] |
| 541 + outputs = [ |
| 542 + "$google_python_dir/protobuf/internal/{{source_file_part}}", |
| 543 + ] |
| 544 +} |
| 545 + |
| 546 +copy("copy_google_protobuf_pyext") { |
| 547 + sources = [ |
| 548 + "python/google/protobuf/pyext/__init__.py", |
| 549 + "python/google/protobuf/pyext/cpp_message.py", |
| 550 + ] |
| 551 + outputs = [ |
| 552 + "$google_python_dir/protobuf/pyext/{{source_file_part}}", |
| 553 + ] |
| 554 +} |
| 555 + |
| 556 +group("py_proto") { |
| 557 + public_deps = [ |
| 558 + ":copy_google", |
| 559 + ":copy_google_protobuf", |
| 560 + ":copy_google_protobuf_internal", |
| 561 + ] |
| 562 + |
| 563 + # Targets that depend on this should depend on the copied data files. |
| 564 + data = get_target_outputs(":copy_google") |
| 565 + data += get_target_outputs(":copy_google_protobuf") |
| 566 + data += get_target_outputs(":copy_google_protobuf_internal") |
| 567 +} |
| 568 diff --git a/third_party/protobuf/DEPS b/third_party/protobuf/DEPS |
| 569 new file mode 100644 |
| 570 index 0000000..2155370 |
| 571 --- /dev/null |
| 572 +++ b/third_party/protobuf/DEPS |
| 573 @@ -0,0 +1,4 @@ |
| 574 +include_rules = [ |
| 575 + '+google/protobuf', |
| 576 + '+net/proto', # Bogus include in upstream sources. |
| 577 +] |
| 578 diff --git a/third_party/protobuf/OWNERS b/third_party/protobuf/OWNERS |
| 579 new file mode 100644 |
| 580 index 0000000..a0b277d |
| 581 --- /dev/null |
| 582 +++ b/third_party/protobuf/OWNERS |
| 583 @@ -0,0 +1,2 @@ |
| 584 +agl@chromium.org |
| 585 +scottmg@chromium.org |
| 586 diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.
chromium |
| 587 new file mode 100644 |
| 588 index 0000000..d845dfa |
| 589 --- /dev/null |
| 590 +++ b/third_party/protobuf/README.chromium |
| 591 @@ -0,0 +1,32 @@ |
| 592 +Name: Protocol Buffers |
| 593 +Short Name: protobuf |
| 594 +URL: https://github.com/google/protobuf |
| 595 +License: BSD |
| 596 +License File: LICENSE |
| 597 +Version: unknown |
| 598 +Revision: 6994b07f1480f658e2ea6262f8ca804e836ef1d2 |
| 599 +Security Critical: yes |
| 600 + |
| 601 +Steps used to create the current version: |
| 602 +(1) Download and unpack protobuf sources from |
| 603 + https://github.com/google/protobuf/archive/master.zip . |
| 604 +(2) Apply the patches in patches/ in order. In all these cases, after |
| 605 + determining how to adapt the patch to the current protobuf codebase, you |
| 606 + should regenerate the patch for the next maintainer. |
| 607 + |
| 608 + A brief description of each patch: |
| 609 + 00: Add initial GYP/GN buildfiles, DEPS, OWNERS, and README.chromium. You |
| 610 + will need to modify the README to include the correct revision, and modif
y |
| 611 + the buildfiles to reflect the actual files in the source tree, what they |
| 612 + #include, what warnings they trigger, etc. |
| 613 +(3) Generate descriptor_pb2.py using something like the following steps. Make |
| 614 + sure you've regenerated your buildfiles and will build protoc from the |
| 615 + newly-modified sources above. |
| 616 + $ cd $SRC_DIR |
| 617 + $ ninja -C out/Debug protoc |
| 618 + $ cd third_party/protobuf/src |
| 619 + $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor
.proto |
| 620 + $ cd .. |
| 621 + $ git add -f python/google/protobuf/descriptor_pb2.py |
| 622 + $ git commit |
| 623 +(4) At this point you should be done, and able to successfully build everything
. |
| 624 diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto
_library.gni |
| 625 new file mode 100644 |
| 626 index 0000000..8e7ea14 |
| 627 --- /dev/null |
| 628 +++ b/third_party/protobuf/proto_library.gni |
| 629 @@ -0,0 +1,175 @@ |
| 630 +# Copyright 2014 The Chromium Authors. All rights reserved. |
| 631 +# Use of this source code is governed by a BSD-style license that can be |
| 632 +# found in the LICENSE file. |
| 633 + |
| 634 +# Compile a protocol buffer. |
| 635 +# |
| 636 +# Protobuf parameters: |
| 637 +# |
| 638 +# proto_out_dir (optional) |
| 639 +# Specifies the path suffix that output files are generated under. This |
| 640 +# path will be appended to the root_gen_dir. |
| 641 +# |
| 642 +# Targets that depend on the proto target will be able to include the |
| 643 +# resulting proto headers with an include like: |
| 644 +# #include "dir/for/my_proto_lib/foo.pb.h" |
| 645 +# If undefined, this defaults to matching the input directory for each |
| 646 +# .proto file (you should almost always use the default mode). |
| 647 +# |
| 648 +# cc_generator_options (optional) |
| 649 +# List of extra flags passed to the protocol compiler. If you need to |
| 650 +# add an EXPORT macro to a protobuf's C++ header, set the |
| 651 +# 'cc_generator_options' variable with the value: |
| 652 +# 'dllexport_decl=FOO_EXPORT:' (note trailing colon). |
| 653 +# |
| 654 +# It is likely you also need to #include a file for the above EXPORT |
| 655 +# macro to work. See cc_include. |
| 656 +# |
| 657 +# cc_include (optional) |
| 658 +# String listing an extra include that should be passed. |
| 659 +# Example: cc_include = "foo/bar.h" |
| 660 +# |
| 661 +# deps (optional) |
| 662 +# Additional dependencies. |
| 663 +# |
| 664 +# Parameters for compiling the generated code: |
| 665 +# |
| 666 +# defines (optional) |
| 667 +# Defines to supply to the source set that compiles the generated source |
| 668 +# code. |
| 669 +# |
| 670 +# extra_configs (optional) |
| 671 +# A list of config labels that will be appended to the configs applying |
| 672 +# to the source set. |
| 673 +# |
| 674 +# Example: |
| 675 +# proto_library("mylib") { |
| 676 +# sources = [ |
| 677 +# "foo.proto", |
| 678 +# ] |
| 679 +# } |
| 680 + |
| 681 +template("proto_library") { |
| 682 + assert(defined(invoker.sources), "Need sources for proto_library") |
| 683 + |
| 684 + # Don't apply OS-specific sources filtering to the assignments later on. |
| 685 + # Platform files should have gotten filtered out in the sources assignment |
| 686 + # when this template was invoked. If they weren't, it was on purpose and |
| 687 + # this template shouldn't re-apply the filter. |
| 688 + set_sources_assignment_filter([]) |
| 689 + |
| 690 + action_name = "${target_name}_gen" |
| 691 + source_set_name = target_name |
| 692 + action_foreach(action_name) { |
| 693 + visibility = [ ":$source_set_name" ] |
| 694 + |
| 695 + script = "//tools/protoc_wrapper/protoc_wrapper.py" |
| 696 + |
| 697 + sources = invoker.sources |
| 698 + |
| 699 + # Compute the output directory, both relative to the source root (for |
| 700 + # declaring "outputs") and relative to the build dir (for passing to the |
| 701 + # script). |
| 702 + if (defined(invoker.proto_out_dir)) { |
| 703 + # Put the results in the specified dir in the gen tree. |
| 704 + out_dir = "$root_gen_dir/" + invoker.proto_out_dir |
| 705 + rel_out_dir = rebase_path(out_dir, root_build_dir) |
| 706 + py_out_dir = "$root_out_dir/pyproto/" + invoker.proto_out_dir |
| 707 + } else { |
| 708 + # Use the gen directory corresponding to the source file for C++ sources. |
| 709 + # This expansion will be done differently in the outputs and the args, so |
| 710 + # we don't need to worry about rebasing as above. Always put Python |
| 711 + # sources in "pyproto". |
| 712 + out_dir = "{{source_gen_dir}}" |
| 713 + rel_out_dir = "{{source_gen_dir}}" |
| 714 + py_out_dir = "$root_out_dir/pyproto/{{source_root_relative_dir}}" |
| 715 + } |
| 716 + rel_py_out_dir = rebase_path(py_out_dir, root_build_dir) |
| 717 + |
| 718 + outputs = [ |
| 719 + "$py_out_dir/{{source_name_part}}_pb2.py", |
| 720 + "$out_dir/{{source_name_part}}.pb.cc", |
| 721 + "$out_dir/{{source_name_part}}.pb.h", |
| 722 + ] |
| 723 + |
| 724 + args = [] |
| 725 + if (defined(invoker.cc_include)) { |
| 726 + args += [ |
| 727 + "--include", |
| 728 + invoker.cc_include, |
| 729 + ] |
| 730 + } |
| 731 + |
| 732 + args += [ |
| 733 + "--protobuf", |
| 734 + "$rel_out_dir/{{source_name_part}}.pb.h", |
| 735 + "--proto-in-dir", |
| 736 + "{{source_dir}}", |
| 737 + "--proto-in-file", |
| 738 + "{{source_file_part}}", |
| 739 + |
| 740 + # TODO(brettw) support system protobuf compiler. |
| 741 + "--use-system-protobuf=0", |
| 742 + ] |
| 743 + |
| 744 + protoc_label = "//third_party/protobuf:protoc($host_toolchain)" |
| 745 + args += [ |
| 746 + "--", |
| 747 + |
| 748 + # Prepend with "./" so this will never pick up the system one (normally |
| 749 + # when not cross-compiling, protoc's output directory will be the same |
| 750 + # as the build dir, so the relative location will be empty). |
| 751 + "./" + |
| 752 + rebase_path(get_label_info(protoc_label, "root_out_dir") + "/protoc", |
| 753 + root_build_dir), |
| 754 + ] |
| 755 + |
| 756 + # If passed cc_generator_options should end in a colon, which will separate |
| 757 + # it from the directory when we concatenate them. The proto compiler |
| 758 + # understands this syntax. |
| 759 + if (defined(invoker.cc_generator_options)) { |
| 760 + cc_generator_options = invoker.cc_generator_options |
| 761 + } else { |
| 762 + cc_generator_options = "" |
| 763 + } |
| 764 + args += [ |
| 765 + # cc_generator_options is supposed to end in a colon if it's nonempty. |
| 766 + "--cpp_out", |
| 767 + "$cc_generator_options$rel_out_dir", |
| 768 + "--python_out", |
| 769 + rel_py_out_dir, |
| 770 + ] |
| 771 + |
| 772 + deps = [ |
| 773 + protoc_label, |
| 774 + ] |
| 775 + if (defined(invoker.deps)) { |
| 776 + deps += invoker.deps |
| 777 + } |
| 778 + } |
| 779 + |
| 780 + source_set(target_name) { |
| 781 + forward_variables_from(invoker, |
| 782 + [ |
| 783 + "visibility", |
| 784 + "defines", |
| 785 + ]) |
| 786 + |
| 787 + sources = get_target_outputs(":$action_name") |
| 788 + |
| 789 + if (defined(invoker.extra_configs)) { |
| 790 + configs += invoker.extra_configs |
| 791 + } |
| 792 + |
| 793 + public_configs = [ "//third_party/protobuf:using_proto" ] |
| 794 + |
| 795 + public_deps = [ |
| 796 + # The generated headers reference headers within protobuf_lite, so |
| 797 + # dependencies must be able to find those headers too. |
| 798 + "//third_party/protobuf:protobuf_lite", |
| 799 + ] |
| 800 + deps = [ |
| 801 + ":$action_name", |
| 802 + ] |
| 803 + } |
| 804 +} |
| 805 diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.g
yp |
| 806 new file mode 100644 |
| 807 index 0000000..2f06845 |
| 808 --- /dev/null |
| 809 +++ b/third_party/protobuf/protobuf.gyp |
| 810 @@ -0,0 +1,535 @@ |
| 811 +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 812 +# Use of this source code is governed by a BSD-style license that can be |
| 813 +# found in the LICENSE file. |
| 814 + |
| 815 +{ |
| 816 + 'conditions': [ |
| 817 + ['use_system_protobuf==0', { |
| 818 + 'conditions': [ |
| 819 + ['OS=="win"', { |
| 820 + 'target_defaults': { |
| 821 + 'msvs_disabled_warnings': [ |
| 822 + 4018, # signed/unsigned mismatch in comparison |
| 823 + 4065, # switch statement contains 'default' but no 'case' labels |
| 824 + 4146, # unary minus operator applied to unsigned type |
| 825 + 4244, # implicit conversion, possible loss of data |
| 826 + 4267, # size_t to int truncation |
| 827 + 4291, # no matching operator delete for a placement new |
| 828 + 4355, # 'this' used in base member initializer list |
| 829 + 4506, # no definition for inline function |
| 830 + ], |
| 831 + 'defines!': [ |
| 832 + 'WIN32_LEAN_AND_MEAN', # Protobuf defines this itself. |
| 833 + ], |
| 834 + }, |
| 835 + }], |
| 836 + ['OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="nin
ja"', { |
| 837 + 'variables': { |
| 838 + 'ninja_output_dir': 'ninja-protoc', |
| 839 + 'ninja_product_dir': |
| 840 + '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)', |
| 841 + # Gyp to rerun |
| 842 + 're_run_targets': [ |
| 843 + 'third_party/protobuf/protobuf.gyp', |
| 844 + ], |
| 845 + }, |
| 846 + 'targets': [ |
| 847 + { |
| 848 + # On iOS, generating protoc is done via two actions: (1) compilin
g |
| 849 + # the executable with ninja, and (2) copying the executable into
a |
| 850 + # location that is shared with other projects. These actions are |
| 851 + # separated into two targets in order to be able to specify that
the |
| 852 + # second action should not run until the first action finishes (s
ince |
| 853 + # the ordering of multiple actions in one target is defined only
by |
| 854 + # inputs and outputs, and it's impossible to set correct inputs f
or |
| 855 + # the ninja build, so setting all the inputs and outputs isn't an |
| 856 + # option). The first target is given here; the second target is t
he |
| 857 + # normal protoc target under the condition that "OS==iOS". |
| 858 + 'target_name': 'compile_protoc', |
| 859 + 'type': 'none', |
| 860 + 'toolsets': ['host'], |
| 861 + 'includes': ['../../build/ios/mac_build.gypi'], |
| 862 + 'actions': [ |
| 863 + { |
| 864 + 'action_name': 'compile protoc', |
| 865 + 'inputs': [], |
| 866 + 'outputs': [], |
| 867 + 'action': [ |
| 868 + '<@(ninja_cmd)', |
| 869 + 'protoc', |
| 870 + ], |
| 871 + 'message': 'Generating the C++ protocol buffers compiler', |
| 872 + }, |
| 873 + ], |
| 874 + }, |
| 875 + ], |
| 876 + }], |
| 877 + ], |
| 878 + 'targets': [ |
| 879 + # The "lite" lib is about 1/7th the size of the heavy lib, |
| 880 + # but it doesn't support some of the more exotic features of |
| 881 + # protobufs, like reflection. To generate C++ code that can link |
| 882 + # against the lite version of the library, add the option line: |
| 883 + # |
| 884 + # option optimize_for = LITE_RUNTIME; |
| 885 + # |
| 886 + # to your .proto file. |
| 887 + { |
| 888 + 'target_name': 'protobuf_lite', |
| 889 + 'type': 'static_library', |
| 890 + 'toolsets': ['host', 'target'], |
| 891 + 'includes': [ |
| 892 + 'protobuf_lite.gypi', |
| 893 + ], |
| 894 + }, |
| 895 + # This is the full, heavy protobuf lib that's needed for c++ .protos |
| 896 + # that don't specify the LITE_RUNTIME option. The protocol |
| 897 + # compiler itself (protoc) falls into that category. |
| 898 + # |
| 899 + # DO NOT LINK AGAINST THIS TARGET IN CHROME CODE --agl |
| 900 + { |
| 901 + 'target_name': 'protobuf_full_do_not_use', |
| 902 + 'type': 'static_library', |
| 903 + 'toolsets': ['host','target'], |
| 904 + 'sources': [ |
| 905 + 'src/google/protobuf/any.cc', |
| 906 + 'src/google/protobuf/any.h', |
| 907 + 'src/google/protobuf/any.pb.cc', |
| 908 + 'src/google/protobuf/any.pb.h', |
| 909 + 'src/google/protobuf/api.pb.cc', |
| 910 + 'src/google/protobuf/api.pb.h', |
| 911 + 'src/google/protobuf/compiler/importer.cc', |
| 912 + 'src/google/protobuf/compiler/importer.h', |
| 913 + 'src/google/protobuf/compiler/parser.cc', |
| 914 + 'src/google/protobuf/compiler/parser.h', |
| 915 + 'src/google/protobuf/descriptor.cc', |
| 916 + 'src/google/protobuf/descriptor.pb.cc', |
| 917 + 'src/google/protobuf/descriptor_database.cc', |
| 918 + 'src/google/protobuf/descriptor_database.h', |
| 919 + 'src/google/protobuf/duration.pb.cc', |
| 920 + 'src/google/protobuf/duration.pb.h', |
| 921 + 'src/google/protobuf/dynamic_message.cc', |
| 922 + 'src/google/protobuf/dynamic_message.h', |
| 923 + 'src/google/protobuf/empty.pb.cc', |
| 924 + 'src/google/protobuf/empty.pb.h', |
| 925 + 'src/google/protobuf/extension_set_heavy.cc', |
| 926 + 'src/google/protobuf/field_mask.pb.cc', |
| 927 + 'src/google/protobuf/field_mask.pb.h', |
| 928 + 'src/google/protobuf/generated_message_reflection.cc', |
| 929 + 'src/google/protobuf/generated_message_reflection.h', |
| 930 + # gzip_stream.cc pulls in zlib, but it's not actually used by |
| 931 + # protoc, just by test code; so instead of compiling zlib for the |
| 932 + # host, let's just exclude these. |
| 933 + # 'src/google/protobuf/io/gzip_stream.cc', |
| 934 + # 'src/google/protobuf/io/gzip_stream.h', |
| 935 + 'src/google/protobuf/io/printer.cc', |
| 936 + 'src/google/protobuf/io/printer.h', |
| 937 + 'src/google/protobuf/io/strtod.cc', |
| 938 + 'src/google/protobuf/io/strtod.h', |
| 939 + 'src/google/protobuf/io/tokenizer.cc', |
| 940 + 'src/google/protobuf/io/tokenizer.h', |
| 941 + 'src/google/protobuf/io/zero_copy_stream_impl.cc', |
| 942 + 'src/google/protobuf/io/zero_copy_stream_impl.h', |
| 943 + 'src/google/protobuf/map.h', |
| 944 + 'src/google/protobuf/map_entry_lite.h', |
| 945 + 'src/google/protobuf/map_field.cc', |
| 946 + 'src/google/protobuf/map_field.h', |
| 947 + 'src/google/protobuf/map_field_inl.h', |
| 948 + 'src/google/protobuf/map_field_lite.h', |
| 949 + 'src/google/protobuf/map_type_handler.h', |
| 950 + 'src/google/protobuf/message.cc', |
| 951 + 'src/google/protobuf/reflection_ops.cc', |
| 952 + 'src/google/protobuf/reflection_ops.h', |
| 953 + 'src/google/protobuf/service.cc', |
| 954 + 'src/google/protobuf/service.h', |
| 955 + 'src/google/protobuf/source_context.pb.cc', |
| 956 + 'src/google/protobuf/source_context.pb.h', |
| 957 + 'src/google/protobuf/struct.pb.cc', |
| 958 + 'src/google/protobuf/struct.pb.h', |
| 959 + 'src/google/protobuf/stubs/mathlimits.cc', |
| 960 + 'src/google/protobuf/stubs/mathutil.h', |
| 961 + 'src/google/protobuf/stubs/shared_ptr.h', |
| 962 + 'src/google/protobuf/stubs/singleton.h', |
| 963 + 'src/google/protobuf/stubs/status_macros.h', |
| 964 + 'src/google/protobuf/stubs/structurally_valid.cc', |
| 965 + 'src/google/protobuf/stubs/substitute.cc', |
| 966 + 'src/google/protobuf/stubs/substitute.h', |
| 967 + 'src/google/protobuf/text_format.cc', |
| 968 + 'src/google/protobuf/text_format.h', |
| 969 + 'src/google/protobuf/timestamp.pb.cc', |
| 970 + 'src/google/protobuf/timestamp.pb.h', |
| 971 + 'src/google/protobuf/type.pb.cc', |
| 972 + 'src/google/protobuf/type.pb.h', |
| 973 + 'src/google/protobuf/unknown_field_set.cc', |
| 974 + 'src/google/protobuf/util/field_comparator.cc', |
| 975 + 'src/google/protobuf/util/field_comparator.h', |
| 976 + 'src/google/protobuf/util/internal/constants.h', |
| 977 + 'src/google/protobuf/util/internal/datapiece.cc', |
| 978 + 'src/google/protobuf/util/internal/datapiece.h', |
| 979 + 'src/google/protobuf/util/internal/default_value_objectwriter.cc', |
| 980 + 'src/google/protobuf/util/internal/default_value_objectwriter.h', |
| 981 + 'src/google/protobuf/util/internal/error_listener.cc', |
| 982 + 'src/google/protobuf/util/internal/error_listener.h', |
| 983 + 'src/google/protobuf/util/internal/field_mask_utility.cc', |
| 984 + 'src/google/protobuf/util/internal/field_mask_utility.h', |
| 985 + 'src/google/protobuf/util/internal/json_escaping.cc', |
| 986 + 'src/google/protobuf/util/internal/json_escaping.h', |
| 987 + 'src/google/protobuf/util/internal/json_objectwriter.cc', |
| 988 + 'src/google/protobuf/util/internal/json_objectwriter.h', |
| 989 + 'src/google/protobuf/util/internal/json_stream_parser.cc', |
| 990 + 'src/google/protobuf/util/internal/json_stream_parser.h', |
| 991 + 'src/google/protobuf/util/internal/location_tracker.h', |
| 992 + 'src/google/protobuf/util/internal/object_location_tracker.h', |
| 993 + 'src/google/protobuf/util/internal/object_source.h', |
| 994 + 'src/google/protobuf/util/internal/object_writer.cc', |
| 995 + 'src/google/protobuf/util/internal/object_writer.h', |
| 996 + 'src/google/protobuf/util/internal/protostream_objectsource.cc', |
| 997 + 'src/google/protobuf/util/internal/protostream_objectsource.h', |
| 998 + 'src/google/protobuf/util/internal/protostream_objectwriter.cc', |
| 999 + 'src/google/protobuf/util/internal/protostream_objectwriter.h', |
| 1000 + 'src/google/protobuf/util/internal/snake2camel_objectwriter.h', |
| 1001 + 'src/google/protobuf/util/internal/structured_objectwriter.h', |
| 1002 + 'src/google/protobuf/util/internal/type_info.cc', |
| 1003 + 'src/google/protobuf/util/internal/type_info.h', |
| 1004 + 'src/google/protobuf/util/internal/type_info_test_helper.cc', |
| 1005 + 'src/google/protobuf/util/internal/type_info_test_helper.h', |
| 1006 + 'src/google/protobuf/util/internal/utility.cc', |
| 1007 + 'src/google/protobuf/util/internal/utility.h', |
| 1008 + 'src/google/protobuf/util/json_util.cc', |
| 1009 + 'src/google/protobuf/util/json_util.h', |
| 1010 + 'src/google/protobuf/util/message_differencer.cc', |
| 1011 + 'src/google/protobuf/util/message_differencer.h', |
| 1012 + 'src/google/protobuf/util/type_resolver.h', |
| 1013 + 'src/google/protobuf/util/type_resolver_util.cc', |
| 1014 + 'src/google/protobuf/util/type_resolver_util.h', |
| 1015 + 'src/google/protobuf/wire_format.cc', |
| 1016 + 'src/google/protobuf/wire_format.h', |
| 1017 + 'src/google/protobuf/wrappers.pb.cc', |
| 1018 + 'src/google/protobuf/wrappers.pb.h', |
| 1019 + ], |
| 1020 + 'dependencies': [ |
| 1021 + 'protobuf_lite', |
| 1022 + ], |
| 1023 + 'export_dependent_settings': [ |
| 1024 + 'protobuf_lite', |
| 1025 + ], |
| 1026 + }, |
| 1027 + { |
| 1028 + 'target_name': 'protoc', |
| 1029 + 'conditions': [ |
| 1030 + ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="n
inja"', { |
| 1031 + 'type': 'executable', |
| 1032 + 'toolsets': ['host'], |
| 1033 + 'sources': [ |
| 1034 + 'src/google/protobuf/compiler/code_generator.cc', |
| 1035 + 'src/google/protobuf/compiler/code_generator.h', |
| 1036 + 'src/google/protobuf/compiler/command_line_interface.cc', |
| 1037 + 'src/google/protobuf/compiler/command_line_interface.h', |
| 1038 + 'src/google/protobuf/compiler/cpp/cpp_enum.cc', |
| 1039 + 'src/google/protobuf/compiler/cpp/cpp_enum.h', |
| 1040 + 'src/google/protobuf/compiler/cpp/cpp_enum_field.cc', |
| 1041 + 'src/google/protobuf/compiler/cpp/cpp_enum_field.h', |
| 1042 + 'src/google/protobuf/compiler/cpp/cpp_extension.cc', |
| 1043 + 'src/google/protobuf/compiler/cpp/cpp_extension.h', |
| 1044 + 'src/google/protobuf/compiler/cpp/cpp_field.cc', |
| 1045 + 'src/google/protobuf/compiler/cpp/cpp_field.h', |
| 1046 + 'src/google/protobuf/compiler/cpp/cpp_file.cc', |
| 1047 + 'src/google/protobuf/compiler/cpp/cpp_file.h', |
| 1048 + 'src/google/protobuf/compiler/cpp/cpp_generator.cc', |
| 1049 + 'src/google/protobuf/compiler/cpp/cpp_generator.h', |
| 1050 + 'src/google/protobuf/compiler/cpp/cpp_helpers.cc', |
| 1051 + 'src/google/protobuf/compiler/cpp/cpp_helpers.h', |
| 1052 + 'src/google/protobuf/compiler/cpp/cpp_map_field.cc', |
| 1053 + 'src/google/protobuf/compiler/cpp/cpp_map_field.h', |
| 1054 + 'src/google/protobuf/compiler/cpp/cpp_message.cc', |
| 1055 + 'src/google/protobuf/compiler/cpp/cpp_message.h', |
| 1056 + 'src/google/protobuf/compiler/cpp/cpp_message_field.cc', |
| 1057 + 'src/google/protobuf/compiler/cpp/cpp_message_field.h', |
| 1058 + 'src/google/protobuf/compiler/cpp/cpp_options.h', |
| 1059 + 'src/google/protobuf/compiler/cpp/cpp_primitive_field.cc', |
| 1060 + 'src/google/protobuf/compiler/cpp/cpp_primitive_field.h', |
| 1061 + 'src/google/protobuf/compiler/cpp/cpp_service.cc', |
| 1062 + 'src/google/protobuf/compiler/cpp/cpp_service.h', |
| 1063 + 'src/google/protobuf/compiler/cpp/cpp_string_field.cc', |
| 1064 + 'src/google/protobuf/compiler/cpp/cpp_string_field.h', |
| 1065 + 'src/google/protobuf/compiler/csharp/csharp_enum.cc', |
| 1066 + 'src/google/protobuf/compiler/csharp/csharp_enum.h', |
| 1067 + 'src/google/protobuf/compiler/csharp/csharp_enum_field.cc', |
| 1068 + 'src/google/protobuf/compiler/csharp/csharp_enum_field.h', |
| 1069 + 'src/google/protobuf/compiler/csharp/csharp_field_base.cc', |
| 1070 + 'src/google/protobuf/compiler/csharp/csharp_field_base.h', |
| 1071 + 'src/google/protobuf/compiler/csharp/csharp_generator.cc', |
| 1072 + 'src/google/protobuf/compiler/csharp/csharp_generator.h', |
| 1073 + 'src/google/protobuf/compiler/csharp/csharp_helpers.cc', |
| 1074 + 'src/google/protobuf/compiler/csharp/csharp_helpers.h', |
| 1075 + 'src/google/protobuf/compiler/csharp/csharp_map_field.cc', |
| 1076 + 'src/google/protobuf/compiler/csharp/csharp_map_field.h', |
| 1077 + 'src/google/protobuf/compiler/csharp/csharp_message.cc', |
| 1078 + 'src/google/protobuf/compiler/csharp/csharp_message.h', |
| 1079 + 'src/google/protobuf/compiler/csharp/csharp_message_field.cc', |
| 1080 + 'src/google/protobuf/compiler/csharp/csharp_message_field.h', |
| 1081 + 'src/google/protobuf/compiler/csharp/csharp_names.h', |
| 1082 + 'src/google/protobuf/compiler/csharp/csharp_primitive_field.cc'
, |
| 1083 + 'src/google/protobuf/compiler/csharp/csharp_primitive_field.h', |
| 1084 + 'src/google/protobuf/compiler/csharp/csharp_repeated_enum_field
.cc', |
| 1085 + 'src/google/protobuf/compiler/csharp/csharp_repeated_enum_field
.h', |
| 1086 + 'src/google/protobuf/compiler/csharp/csharp_repeated_message_fi
eld.cc', |
| 1087 + 'src/google/protobuf/compiler/csharp/csharp_repeated_message_fi
eld.h', |
| 1088 + 'src/google/protobuf/compiler/csharp/csharp_repeated_primitive_
field.cc', |
| 1089 + 'src/google/protobuf/compiler/csharp/csharp_repeated_primitive_
field.h', |
| 1090 + 'src/google/protobuf/compiler/csharp/csharp_source_generator_ba
se.cc', |
| 1091 + 'src/google/protobuf/compiler/csharp/csharp_source_generator_ba
se.h', |
| 1092 + 'src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc', |
| 1093 + 'src/google/protobuf/compiler/csharp/csharp_umbrella_class.h', |
| 1094 + 'src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc', |
| 1095 + 'src/google/protobuf/compiler/csharp/csharp_wrapper_field.h', |
| 1096 + 'src/google/protobuf/compiler/java/java_context.cc', |
| 1097 + 'src/google/protobuf/compiler/java/java_context.h', |
| 1098 + 'src/google/protobuf/compiler/java/java_doc_comment.cc', |
| 1099 + 'src/google/protobuf/compiler/java/java_doc_comment.h', |
| 1100 + 'src/google/protobuf/compiler/java/java_enum.cc', |
| 1101 + 'src/google/protobuf/compiler/java/java_enum.h', |
| 1102 + 'src/google/protobuf/compiler/java/java_enum_field.cc', |
| 1103 + 'src/google/protobuf/compiler/java/java_enum_field.h', |
| 1104 + 'src/google/protobuf/compiler/java/java_enum_field_lite.cc', |
| 1105 + 'src/google/protobuf/compiler/java/java_enum_field_lite.h', |
| 1106 + 'src/google/protobuf/compiler/java/java_extension.cc', |
| 1107 + 'src/google/protobuf/compiler/java/java_extension.h', |
| 1108 + 'src/google/protobuf/compiler/java/java_field.cc', |
| 1109 + 'src/google/protobuf/compiler/java/java_field.h', |
| 1110 + 'src/google/protobuf/compiler/java/java_file.cc', |
| 1111 + 'src/google/protobuf/compiler/java/java_file.h', |
| 1112 + 'src/google/protobuf/compiler/java/java_generator.cc', |
| 1113 + 'src/google/protobuf/compiler/java/java_generator.h', |
| 1114 + 'src/google/protobuf/compiler/java/java_generator_factory.cc', |
| 1115 + 'src/google/protobuf/compiler/java/java_generator_factory.h', |
| 1116 + 'src/google/protobuf/compiler/java/java_helpers.cc', |
| 1117 + 'src/google/protobuf/compiler/java/java_helpers.h', |
| 1118 + 'src/google/protobuf/compiler/java/java_lazy_message_field.cc', |
| 1119 + 'src/google/protobuf/compiler/java/java_lazy_message_field.h', |
| 1120 + 'src/google/protobuf/compiler/java/java_lazy_message_field_lite
.cc', |
| 1121 + 'src/google/protobuf/compiler/java/java_lazy_message_field_lite
.h', |
| 1122 + 'src/google/protobuf/compiler/java/java_map_field.cc', |
| 1123 + 'src/google/protobuf/compiler/java/java_map_field.h', |
| 1124 + 'src/google/protobuf/compiler/java/java_map_field_lite.cc', |
| 1125 + 'src/google/protobuf/compiler/java/java_map_field_lite.h', |
| 1126 + 'src/google/protobuf/compiler/java/java_message.cc', |
| 1127 + 'src/google/protobuf/compiler/java/java_message.h', |
| 1128 + 'src/google/protobuf/compiler/java/java_message_builder.cc', |
| 1129 + 'src/google/protobuf/compiler/java/java_message_builder.h', |
| 1130 + 'src/google/protobuf/compiler/java/java_message_builder_lite.cc
', |
| 1131 + 'src/google/protobuf/compiler/java/java_message_builder_lite.h'
, |
| 1132 + 'src/google/protobuf/compiler/java/java_message_field.cc', |
| 1133 + 'src/google/protobuf/compiler/java/java_message_field.h', |
| 1134 + 'src/google/protobuf/compiler/java/java_message_field_lite.cc', |
| 1135 + 'src/google/protobuf/compiler/java/java_message_field_lite.h', |
| 1136 + 'src/google/protobuf/compiler/java/java_message_lite.cc', |
| 1137 + 'src/google/protobuf/compiler/java/java_message_lite.h', |
| 1138 + 'src/google/protobuf/compiler/java/java_name_resolver.cc', |
| 1139 + 'src/google/protobuf/compiler/java/java_name_resolver.h', |
| 1140 + 'src/google/protobuf/compiler/java/java_primitive_field.cc', |
| 1141 + 'src/google/protobuf/compiler/java/java_primitive_field.h', |
| 1142 + 'src/google/protobuf/compiler/java/java_primitive_field_lite.cc
', |
| 1143 + 'src/google/protobuf/compiler/java/java_primitive_field_lite.h'
, |
| 1144 + 'src/google/protobuf/compiler/java/java_service.cc', |
| 1145 + 'src/google/protobuf/compiler/java/java_service.h', |
| 1146 + 'src/google/protobuf/compiler/java/java_shared_code_generator.c
c', |
| 1147 + 'src/google/protobuf/compiler/java/java_shared_code_generator.h
', |
| 1148 + 'src/google/protobuf/compiler/java/java_string_field.cc', |
| 1149 + 'src/google/protobuf/compiler/java/java_string_field.h', |
| 1150 + 'src/google/protobuf/compiler/java/java_string_field_lite.cc', |
| 1151 + 'src/google/protobuf/compiler/java/java_string_field_lite.h', |
| 1152 + 'src/google/protobuf/compiler/javanano/javanano_enum.cc', |
| 1153 + 'src/google/protobuf/compiler/javanano/javanano_enum.h', |
| 1154 + 'src/google/protobuf/compiler/javanano/javanano_enum_field.cc', |
| 1155 + 'src/google/protobuf/compiler/javanano/javanano_enum_field.h', |
| 1156 + 'src/google/protobuf/compiler/javanano/javanano_extension.cc', |
| 1157 + 'src/google/protobuf/compiler/javanano/javanano_extension.h', |
| 1158 + 'src/google/protobuf/compiler/javanano/javanano_field.cc', |
| 1159 + 'src/google/protobuf/compiler/javanano/javanano_field.h', |
| 1160 + 'src/google/protobuf/compiler/javanano/javanano_file.cc', |
| 1161 + 'src/google/protobuf/compiler/javanano/javanano_file.h', |
| 1162 + 'src/google/protobuf/compiler/javanano/javanano_generator.cc', |
| 1163 + 'src/google/protobuf/compiler/javanano/javanano_generator.h', |
| 1164 + 'src/google/protobuf/compiler/javanano/javanano_helpers.cc', |
| 1165 + 'src/google/protobuf/compiler/javanano/javanano_helpers.h', |
| 1166 + 'src/google/protobuf/compiler/javanano/javanano_map_field.cc', |
| 1167 + 'src/google/protobuf/compiler/javanano/javanano_map_field.h', |
| 1168 + 'src/google/protobuf/compiler/javanano/javanano_message.cc', |
| 1169 + 'src/google/protobuf/compiler/javanano/javanano_message.h', |
| 1170 + 'src/google/protobuf/compiler/javanano/javanano_message_field.c
c', |
| 1171 + 'src/google/protobuf/compiler/javanano/javanano_message_field.h
', |
| 1172 + 'src/google/protobuf/compiler/javanano/javanano_params.h', |
| 1173 + 'src/google/protobuf/compiler/javanano/javanano_primitive_field
.cc', |
| 1174 + 'src/google/protobuf/compiler/javanano/javanano_primitive_field
.h', |
| 1175 + 'src/google/protobuf/compiler/main.cc', |
| 1176 + 'src/google/protobuf/compiler/objectivec/objectivec_enum.cc', |
| 1177 + 'src/google/protobuf/compiler/objectivec/objectivec_enum.h', |
| 1178 + 'src/google/protobuf/compiler/objectivec/objectivec_enum_field.
cc', |
| 1179 + 'src/google/protobuf/compiler/objectivec/objectivec_enum_field.
h', |
| 1180 + 'src/google/protobuf/compiler/objectivec/objectivec_extension.c
c', |
| 1181 + 'src/google/protobuf/compiler/objectivec/objectivec_extension.h
', |
| 1182 + 'src/google/protobuf/compiler/objectivec/objectivec_field.cc', |
| 1183 + 'src/google/protobuf/compiler/objectivec/objectivec_field.h', |
| 1184 + 'src/google/protobuf/compiler/objectivec/objectivec_file.cc', |
| 1185 + 'src/google/protobuf/compiler/objectivec/objectivec_file.h', |
| 1186 + 'src/google/protobuf/compiler/objectivec/objectivec_generator.c
c', |
| 1187 + 'src/google/protobuf/compiler/objectivec/objectivec_generator.h
', |
| 1188 + 'src/google/protobuf/compiler/objectivec/objectivec_helpers.cc'
, |
| 1189 + 'src/google/protobuf/compiler/objectivec/objectivec_helpers.h', |
| 1190 + 'src/google/protobuf/compiler/objectivec/objectivec_map_field.c
c', |
| 1191 + 'src/google/protobuf/compiler/objectivec/objectivec_map_field.h
', |
| 1192 + 'src/google/protobuf/compiler/objectivec/objectivec_message.cc'
, |
| 1193 + 'src/google/protobuf/compiler/objectivec/objectivec_message.h', |
| 1194 + 'src/google/protobuf/compiler/objectivec/objectivec_message_fie
ld.cc', |
| 1195 + 'src/google/protobuf/compiler/objectivec/objectivec_message_fie
ld.h', |
| 1196 + 'src/google/protobuf/compiler/objectivec/objectivec_oneof.cc', |
| 1197 + 'src/google/protobuf/compiler/objectivec/objectivec_oneof.h', |
| 1198 + 'src/google/protobuf/compiler/objectivec/objectivec_primitive_f
ield.cc', |
| 1199 + 'src/google/protobuf/compiler/objectivec/objectivec_primitive_f
ield.h', |
| 1200 + 'src/google/protobuf/compiler/plugin.cc', |
| 1201 + 'src/google/protobuf/compiler/plugin.h', |
| 1202 + 'src/google/protobuf/compiler/plugin.pb.cc', |
| 1203 + 'src/google/protobuf/compiler/plugin.pb.h', |
| 1204 + 'src/google/protobuf/compiler/python/python_generator.cc', |
| 1205 + 'src/google/protobuf/compiler/python/python_generator.h', |
| 1206 + 'src/google/protobuf/compiler/ruby/ruby_generator.cc', |
| 1207 + 'src/google/protobuf/compiler/ruby/ruby_generator.h', |
| 1208 + 'src/google/protobuf/compiler/subprocess.cc', |
| 1209 + 'src/google/protobuf/compiler/subprocess.h', |
| 1210 + 'src/google/protobuf/compiler/zip_writer.cc', |
| 1211 + 'src/google/protobuf/compiler/zip_writer.h', |
| 1212 + ], |
| 1213 + 'dependencies': [ |
| 1214 + 'protobuf_full_do_not_use', |
| 1215 + ], |
| 1216 + }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATO
R_FLAVOR)"!="ninja" |
| 1217 + 'type': 'none', |
| 1218 + 'toolsets': ['host'], |
| 1219 + 'dependencies': [ |
| 1220 + 'compile_protoc', |
| 1221 + ], |
| 1222 + 'actions': [ |
| 1223 + { |
| 1224 + 'action_name': 'copy protoc', |
| 1225 + 'inputs': [ |
| 1226 + '<(ninja_product_dir)/protoc', |
| 1227 + ], |
| 1228 + 'outputs': [ |
| 1229 + '<(PRODUCT_DIR)/protoc', |
| 1230 + ], |
| 1231 + 'action': [ |
| 1232 + 'cp', |
| 1233 + '<(ninja_product_dir)/protoc', |
| 1234 + '<(PRODUCT_DIR)/protoc', |
| 1235 + ], |
| 1236 + }, |
| 1237 + ], |
| 1238 + }], |
| 1239 + ], |
| 1240 + }, |
| 1241 + { |
| 1242 + # Generate the python module needed by all protoc-generated Python co
de. |
| 1243 + 'target_name': 'py_proto', |
| 1244 + 'type': 'none', |
| 1245 + 'copies': [ |
| 1246 + { |
| 1247 + 'destination': '<(PRODUCT_DIR)/pyproto/google/', |
| 1248 + 'files': [ |
| 1249 + 'python/google/__init__.py', |
| 1250 + ], |
| 1251 + }, |
| 1252 + { |
| 1253 + 'destination': '<(PRODUCT_DIR)/pyproto/google/protobuf', |
| 1254 + 'files': [ |
| 1255 + 'python/google/protobuf/__init__.py', |
| 1256 + 'python/google/protobuf/descriptor.py', |
| 1257 + 'python/google/protobuf/descriptor_database.py', |
| 1258 + # TODO(ncarter): protoc's python generator treats |
| 1259 + # descriptor.proto specially, but only when the input path is |
| 1260 + # exactly "google/protobuf/descriptor.proto". I'm not sure how |
| 1261 + # to execute a rule from a different directory. For now, use a |
| 1262 + # manually-generated copy of descriptor_pb2.py. |
| 1263 + 'python/google/protobuf/descriptor_pb2.py', |
| 1264 + 'python/google/protobuf/descriptor_pool.py', |
| 1265 + 'python/google/protobuf/message.py', |
| 1266 + 'python/google/protobuf/message_factory.py', |
| 1267 + 'python/google/protobuf/proto_builder.py', |
| 1268 + 'python/google/protobuf/reflection.py', |
| 1269 + 'python/google/protobuf/service.py', |
| 1270 + 'python/google/protobuf/service_reflection.py', |
| 1271 + 'python/google/protobuf/symbol_database.py', |
| 1272 + 'python/google/protobuf/text_encoding.py', |
| 1273 + 'python/google/protobuf/text_format.py', |
| 1274 + ], |
| 1275 + }, |
| 1276 + { |
| 1277 + 'destination': '<(PRODUCT_DIR)/pyproto/google/protobuf/internal', |
| 1278 + 'files': [ |
| 1279 + 'python/google/protobuf/internal/__init__.py', |
| 1280 + 'python/google/protobuf/internal/api_implementation.py', |
| 1281 + 'python/google/protobuf/internal/containers.py', |
| 1282 + 'python/google/protobuf/internal/decoder.py', |
| 1283 + 'python/google/protobuf/internal/encoder.py', |
| 1284 + 'python/google/protobuf/internal/enum_type_wrapper.py', |
| 1285 + 'python/google/protobuf/internal/generator_test.py', |
| 1286 + 'python/google/protobuf/internal/message_listener.py', |
| 1287 + 'python/google/protobuf/internal/python_message.py', |
| 1288 + 'python/google/protobuf/internal/type_checkers.py', |
| 1289 + 'python/google/protobuf/internal/wire_format.py', |
| 1290 + ], |
| 1291 + }, |
| 1292 + { |
| 1293 + 'destination': '<(PRODUCT_DIR)/pyproto/google/protobuf/pyext', |
| 1294 + 'files': [ |
| 1295 + 'python/google/protobuf/pyext/__init__.py', |
| 1296 + 'python/google/protobuf/pyext/cpp_message.py', |
| 1297 + ], |
| 1298 + }, |
| 1299 + ], |
| 1300 + }, |
| 1301 + ], |
| 1302 + }, { # use_system_protobuf==1 |
| 1303 + 'targets': [ |
| 1304 + { |
| 1305 + 'target_name': 'protobuf_lite', |
| 1306 + 'type': 'none', |
| 1307 + 'direct_dependent_settings': { |
| 1308 + 'cflags': [ |
| 1309 + # Use full protobuf, because vanilla protobuf doesn't have |
| 1310 + # our custom patch to retain unknown fields in lite mode. |
| 1311 + '<!@(pkg-config --cflags protobuf)', |
| 1312 + ], |
| 1313 + 'defines': [ |
| 1314 + 'USE_SYSTEM_PROTOBUF', |
| 1315 + |
| 1316 + # This macro must be defined to suppress the use |
| 1317 + # of dynamic_cast<>, which requires RTTI. |
| 1318 + 'GOOGLE_PROTOBUF_NO_RTTI', |
| 1319 + 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', |
| 1320 + ], |
| 1321 + }, |
| 1322 + 'link_settings': { |
| 1323 + # Use full protobuf, because vanilla protobuf doesn't have |
| 1324 + # our custom patch to retain unknown fields in lite mode. |
| 1325 + 'ldflags': [ |
| 1326 + '<!@(pkg-config --libs-only-L --libs-only-other protobuf)', |
| 1327 + ], |
| 1328 + 'libraries': [ |
| 1329 + '<!@(pkg-config --libs-only-l protobuf)', |
| 1330 + ], |
| 1331 + }, |
| 1332 + }, |
| 1333 + { |
| 1334 + 'target_name': 'protoc', |
| 1335 + 'type': 'none', |
| 1336 + 'toolsets': ['host', 'target'], |
| 1337 + }, |
| 1338 + { |
| 1339 + 'target_name': 'py_proto', |
| 1340 + 'type': 'none', |
| 1341 + }, |
| 1342 + ], |
| 1343 + }], |
| 1344 + ], |
| 1345 +} |
| 1346 diff --git a/third_party/protobuf/protobuf_lite.gypi b/third_party/protobuf/prot
obuf_lite.gypi |
| 1347 new file mode 100644 |
| 1348 index 0000000..8a4f8de |
| 1349 --- /dev/null |
| 1350 +++ b/third_party/protobuf/protobuf_lite.gypi |
| 1351 @@ -0,0 +1,108 @@ |
| 1352 +# Copyright 2013 The Chromium Authors. All rights reserved. |
| 1353 +# Use of this source code is governed by a BSD-style license that can be |
| 1354 +# found in the LICENSE file. |
| 1355 + |
| 1356 +{ |
| 1357 + 'sources': [ |
| 1358 + 'src/google/protobuf/arena.cc', |
| 1359 + 'src/google/protobuf/arena.h', |
| 1360 + 'src/google/protobuf/arenastring.cc', |
| 1361 + 'src/google/protobuf/arenastring.h', |
| 1362 + 'src/google/protobuf/descriptor.h', |
| 1363 + 'src/google/protobuf/descriptor.pb.h', |
| 1364 + 'src/google/protobuf/extension_set.cc', |
| 1365 + 'src/google/protobuf/extension_set.h', |
| 1366 + 'src/google/protobuf/generated_enum_reflection.h', |
| 1367 + 'src/google/protobuf/generated_enum_util.h', |
| 1368 + 'src/google/protobuf/generated_message_util.cc', |
| 1369 + 'src/google/protobuf/generated_message_util.h', |
| 1370 + 'src/google/protobuf/io/coded_stream.cc', |
| 1371 + 'src/google/protobuf/io/coded_stream.h', |
| 1372 + 'src/google/protobuf/io/coded_stream_inl.h', |
| 1373 + 'src/google/protobuf/io/zero_copy_stream.cc', |
| 1374 + 'src/google/protobuf/io/zero_copy_stream.h', |
| 1375 + 'src/google/protobuf/io/zero_copy_stream_impl_lite.cc', |
| 1376 + 'src/google/protobuf/io/zero_copy_stream_impl_lite.h', |
| 1377 + 'src/google/protobuf/message.h', |
| 1378 + 'src/google/protobuf/message_lite.cc', |
| 1379 + 'src/google/protobuf/message_lite.h', |
| 1380 + 'src/google/protobuf/metadata.h', |
| 1381 + 'src/google/protobuf/repeated_field.cc', |
| 1382 + 'src/google/protobuf/repeated_field.h', |
| 1383 + 'src/google/protobuf/stubs/atomic_sequence_num.h', |
| 1384 + 'src/google/protobuf/stubs/atomicops.h', |
| 1385 + 'src/google/protobuf/stubs/atomicops_internals_aix.h', |
| 1386 + 'src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h', |
| 1387 + 'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h', |
| 1388 + 'src/google/protobuf/stubs/atomicops_internals_arm_qnx.h', |
| 1389 + 'src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h', |
| 1390 + 'src/google/protobuf/stubs/atomicops_internals_generic_gcc.h', |
| 1391 + 'src/google/protobuf/stubs/atomicops_internals_macosx.h', |
| 1392 + 'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h', |
| 1393 + 'src/google/protobuf/stubs/atomicops_internals_pnacl.h', |
| 1394 + 'src/google/protobuf/stubs/atomicops_internals_solaris.h', |
| 1395 + 'src/google/protobuf/stubs/atomicops_internals_tsan.h', |
| 1396 + 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc', |
| 1397 + 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h', |
| 1398 + 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc', |
| 1399 + 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h', |
| 1400 + 'src/google/protobuf/stubs/bytestream.cc', |
| 1401 + 'src/google/protobuf/stubs/bytestream.h', |
| 1402 + 'src/google/protobuf/stubs/callback.h', |
| 1403 + 'src/google/protobuf/stubs/casts.h', |
| 1404 + 'src/google/protobuf/stubs/common.cc', |
| 1405 + 'src/google/protobuf/stubs/common.h', |
| 1406 + 'src/google/protobuf/stubs/fastmem.h', |
| 1407 + 'src/google/protobuf/stubs/hash.h', |
| 1408 + 'src/google/protobuf/stubs/logging.h', |
| 1409 + 'src/google/protobuf/stubs/macros.h', |
| 1410 + 'src/google/protobuf/stubs/map_util.h', |
| 1411 + 'src/google/protobuf/stubs/mathlimits.h', |
| 1412 + 'src/google/protobuf/stubs/mutex.h', |
| 1413 + 'src/google/protobuf/stubs/once.cc', |
| 1414 + 'src/google/protobuf/stubs/once.h', |
| 1415 + 'src/google/protobuf/stubs/platform_macros.h', |
| 1416 + 'src/google/protobuf/stubs/port.h', |
| 1417 + 'src/google/protobuf/stubs/scoped_ptr.h', |
| 1418 + 'src/google/protobuf/stubs/status.cc', |
| 1419 + 'src/google/protobuf/stubs/status.h', |
| 1420 + 'src/google/protobuf/stubs/statusor.cc', |
| 1421 + 'src/google/protobuf/stubs/statusor.h', |
| 1422 + 'src/google/protobuf/stubs/stl_util.h', |
| 1423 + 'src/google/protobuf/stubs/stringpiece.cc', |
| 1424 + 'src/google/protobuf/stubs/stringpiece.h', |
| 1425 + 'src/google/protobuf/stubs/stringprintf.cc', |
| 1426 + 'src/google/protobuf/stubs/stringprintf.h', |
| 1427 + 'src/google/protobuf/stubs/strutil.cc', |
| 1428 + 'src/google/protobuf/stubs/strutil.h', |
| 1429 + 'src/google/protobuf/stubs/template_util.h', |
| 1430 + 'src/google/protobuf/stubs/time.cc', |
| 1431 + 'src/google/protobuf/stubs/time.h', |
| 1432 + 'src/google/protobuf/stubs/type_traits.h', |
| 1433 + 'src/google/protobuf/testing/googletest.h', |
| 1434 + 'src/google/protobuf/unknown_field_set.h', |
| 1435 + 'src/google/protobuf/wire_format_lite.cc', |
| 1436 + 'src/google/protobuf/wire_format_lite.h', |
| 1437 + 'src/google/protobuf/wire_format_lite_inl.h', |
| 1438 + ], |
| 1439 + 'include_dirs': [ |
| 1440 + 'src', |
| 1441 + ], |
| 1442 + # This macro must be defined to suppress the use of dynamic_cast<>, |
| 1443 + # which requires RTTI. |
| 1444 + 'defines': [ |
| 1445 + 'GOOGLE_PROTOBUF_NO_RTTI', |
| 1446 + 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', |
| 1447 + ], |
| 1448 + 'direct_dependent_settings': { |
| 1449 + 'include_dirs': [ |
| 1450 + 'src', |
| 1451 + ], |
| 1452 + 'defines': [ |
| 1453 + 'GOOGLE_PROTOBUF_NO_RTTI', |
| 1454 + 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', |
| 1455 + ], |
| 1456 + # TODO(jschuh): http://crbug.com/167187 size_t -> int. |
| 1457 + 'msvs_disabled_warnings': [ 4267 ], |
| 1458 + }, |
| 1459 +} |
| 1460 diff --git a/third_party/protobuf/protobuf_nacl.gyp b/third_party/protobuf/proto
buf_nacl.gyp |
| 1461 new file mode 100644 |
| 1462 index 0000000..c2a72c4 |
| 1463 --- /dev/null |
| 1464 +++ b/third_party/protobuf/protobuf_nacl.gyp |
| 1465 @@ -0,0 +1,33 @@ |
| 1466 +# Copyright 2014 The Chromium Authors. All rights reserved. |
| 1467 +# Use of this source code is governed by a BSD-style license that can be |
| 1468 +# found in the LICENSE file. |
| 1469 + |
| 1470 +{ |
| 1471 + 'includes': [ |
| 1472 + '../../native_client/build/untrusted.gypi', |
| 1473 + ], |
| 1474 + 'targets': [ |
| 1475 + { |
| 1476 + 'target_name': 'protobuf_lite_nacl', |
| 1477 + 'type': 'none', |
| 1478 + 'variables': { |
| 1479 + 'nlib_target': 'libprotobuf_lite_nacl.a', |
| 1480 + 'build_glibc': 0, |
| 1481 + 'build_newlib': 0, |
| 1482 + 'build_pnacl_newlib': 1, |
| 1483 + }, |
| 1484 + 'pnacl_compile_flags': [ |
| 1485 + # This disables #warning in hash_map/hash_set headers which are |
| 1486 + # deprecated but still used in protobuf. |
| 1487 + # |
| 1488 + # TODO(sergeyu): Migrate protobuf to unordered_man and unordered_set |
| 1489 + # and remove this flag. |
| 1490 + '-Wno-#warnings', |
| 1491 + '-DHAVE_PTHREAD', |
| 1492 + ], |
| 1493 + 'includes': [ |
| 1494 + 'protobuf_lite.gypi', |
| 1495 + ], |
| 1496 + }, # end of target 'protobuf_lite_nacl' |
| 1497 + ] |
| 1498 +} |
| OLD | NEW |