summaryrefslogtreecommitdiffstats
path: root/third_party/protobuf2
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 23:00:03 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 23:00:03 +0000
commit5e420055ba17803159163f4769c45070e1cd57ff (patch)
tree7f4770fe48ef4b31f123ebe9b3cffe6bcf518fd5 /third_party/protobuf2
parent590a993d08ac65b8828f89bc7bc12d94fb027beb (diff)
downloadchromium_src-5e420055ba17803159163f4769c45070e1cd57ff.zip
chromium_src-5e420055ba17803159163f4769c45070e1cd57ff.tar.gz
chromium_src-5e420055ba17803159163f4769c45070e1cd57ff.tar.bz2
revert this change because protoc.exe crashes during compile and breaks the try servers:
Set the LITE runtime optimization flag in sync.proto. This generates c++ code without support for protobuf reflections, and shaves 175000 bytes off of the final release size of syncapi.dll. Review URL: http://codereview.chromium.org/242133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/protobuf2')
-rw-r--r--third_party/protobuf2/protobuf.gyp124
1 files changed, 46 insertions, 78 deletions
diff --git a/third_party/protobuf2/protobuf.gyp b/third_party/protobuf2/protobuf.gyp
index 907bd28..b6fe48a 100644
--- a/third_party/protobuf2/protobuf.gyp
+++ b/third_party/protobuf2/protobuf.gyp
@@ -14,106 +14,45 @@
'config_h_dir':
'src/vsprojects', # crafted for msvc.
},
- 'target_defaults': {
- 'msvs_disabled_warnings': [
- 4018, # signed/unsigned mismatch in comparison
- 4244, # implicit conversion, possible loss of data
- 4355, # 'this' used in base member initializer list
- ],
- 'defines!': [
- 'WIN32_LEAN_AND_MEAN', # Protobuf defines this itself.
- ],
- },
}]
],
'targets': [
- # The "lite" lib is about 1/7th the size of the heavy lib,
- # but it doesn't support some of the more exotic features of
- # protobufs, like reflection. To generate C++ code that can link
- # against the lite version of the library, add the option line:
- #
- # option optimize_for = LITE_RUNTIME;
- #
- # to your .proto file.
- {
- 'target_name': 'protobuf_lite',
+ { 'target_name': 'protobuf',
'type': '<(library)',
'sources': [
'src/src/google/protobuf/stubs/common.h',
'src/src/google/protobuf/stubs/once.h',
- 'src/src/google/protobuf/extension_set.h',
- 'src/src/google/protobuf/generated_message_util.h',
- 'src/src/google/protobuf/message_lite.h',
- 'src/src/google/protobuf/repeated_field.h',
- 'src/src/google/protobuf/wire_format_lite.h',
- 'src/src/google/protobuf/wire_format_lite_inl.h',
- 'src/src/google/protobuf/io/coded_stream.h',
- 'src/src/google/protobuf/io/zero_copy_stream.h',
- 'src/src/google/protobuf/io/zero_copy_stream_impl_lite.h',
-
- 'src/src/google/protobuf/stubs/common.cc',
- 'src/src/google/protobuf/stubs/once.cc',
- 'src/src/google/protobuf/stubs/hash.cc',
- 'src/src/google/protobuf/stubs/hash.h',
- 'src/src/google/protobuf/stubs/map-util.h',
- 'src/src/google/protobuf/stubs/stl_util-inl.h',
- 'src/src/google/protobuf/extension_set.cc',
- 'src/src/google/protobuf/generated_message_util.cc',
- 'src/src/google/protobuf/message_lite.cc',
- 'src/src/google/protobuf/repeated_field.cc',
- 'src/src/google/protobuf/wire_format_lite.cc',
- 'src/src/google/protobuf/io/coded_stream.cc',
- 'src/src/google/protobuf/io/zero_copy_stream.cc',
- 'src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
- '<(config_h_dir)/config.h',
- ],
- 'include_dirs': [
- '<(config_h_dir)',
- 'src/src',
- ],
- # This macro must be defined to suppress the use of dynamic_cast<>,
- # which requires RTTI.
- 'defines': [
- 'GOOGLE_PROTOBUF_NO_RTTI',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(config_h_dir)',
- 'src/src',
- ],
- 'defines': [
- 'GOOGLE_PROTOBUF_NO_RTTI',
- ],
- },
- },
- # This is the full, heavy protobuf lib that's needed for c++ .proto's
- # that don't specify the LITE_RUNTIME option. The protocol
- # compiler itself (protoc) falls into that category.
- {
- 'target_name': 'protobuf',
- 'type': '<(library)',
- 'sources': [
'src/src/google/protobuf/descriptor.h',
'src/src/google/protobuf/descriptor.pb.h',
'src/src/google/protobuf/descriptor_database.h',
'src/src/google/protobuf/dynamic_message.h',
+ 'src/src/google/protobuf/extension_set.h',
'src/src/google/protobuf/generated_message_reflection.h',
'src/src/google/protobuf/message.h',
'src/src/google/protobuf/reflection_ops.h',
+ 'src/src/google/protobuf/repeated_field.h',
'src/src/google/protobuf/service.h',
'src/src/google/protobuf/text_format.h',
'src/src/google/protobuf/unknown_field_set.h',
'src/src/google/protobuf/wire_format.h',
'src/src/google/protobuf/wire_format_inl.h',
+ 'src/src/google/protobuf/io/coded_stream.h',
'src/src/google/protobuf/io/gzip_stream.h',
'src/src/google/protobuf/io/printer.h',
'src/src/google/protobuf/io/tokenizer.h',
+ 'src/src/google/protobuf/io/zero_copy_stream.h',
'src/src/google/protobuf/io/zero_copy_stream_impl.h',
'src/src/google/protobuf/compiler/code_generator.h',
'src/src/google/protobuf/compiler/command_line_interface.h',
'src/src/google/protobuf/compiler/importer.h',
'src/src/google/protobuf/compiler/parser.h',
+ 'src/src/google/protobuf/stubs/common.cc',
+ 'src/src/google/protobuf/stubs/once.cc',
+ 'src/src/google/protobuf/stubs/hash.cc',
+ 'src/src/google/protobuf/stubs/hash.h',
+ 'src/src/google/protobuf/stubs/map-util.h',
+ 'src/src/google/protobuf/stubs/stl_util-inl.h',
'src/src/google/protobuf/stubs/substitute.cc',
'src/src/google/protobuf/stubs/substitute.h',
'src/src/google/protobuf/stubs/strutil.cc',
@@ -123,31 +62,60 @@
'src/src/google/protobuf/descriptor.pb.cc',
'src/src/google/protobuf/descriptor_database.cc',
'src/src/google/protobuf/dynamic_message.cc',
+ 'src/src/google/protobuf/extension_set.cc',
'src/src/google/protobuf/extension_set_heavy.cc',
'src/src/google/protobuf/generated_message_reflection.cc',
'src/src/google/protobuf/message.cc',
+ 'src/src/google/protobuf/message_lite.cc',
'src/src/google/protobuf/reflection_ops.cc',
+ 'src/src/google/protobuf/repeated_field.cc',
'src/src/google/protobuf/service.cc',
'src/src/google/protobuf/text_format.cc',
'src/src/google/protobuf/unknown_field_set.cc',
'src/src/google/protobuf/wire_format.cc',
+ 'src/src/google/protobuf/wire_format_lite.cc',
+ 'src/src/google/protobuf/io/coded_stream.cc',
'src/src/google/protobuf/io/gzip_stream.cc',
'src/src/google/protobuf/io/printer.cc',
'src/src/google/protobuf/io/tokenizer.cc',
+ 'src/src/google/protobuf/io/zero_copy_stream.cc',
'src/src/google/protobuf/io/zero_copy_stream_impl.cc',
'src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
'src/src/google/protobuf/compiler/importer.cc',
'src/src/google/protobuf/compiler/parser.cc',
+ '<(config_h_dir)/config.h',
],
- 'dependencies': [
- 'protobuf_lite',
+
+ 'conditions': [
+ ['OS != "win"', {
+ # src/src/google/protobuf/generated_message_reflection.h can figure
+ # out whether RTTI is enabled or disabled via compiler-defined macros
+ # when building with MSVC. For other compilers, this macro must be
+ # defined to suppress the use of dynamic_cast<>, which requires RTTI.
+ 'defines': [
+ 'GOOGLE_PROTOBUF_NO_RTTI',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'GOOGLE_PROTOBUF_NO_RTTI',
+ ],
+ },
+ }],
],
- 'export_dependent_settings': [
- 'protobuf_lite',
+
+ 'include_dirs': [
+ '<(config_h_dir)',
+ 'src/src',
],
+
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(config_h_dir)',
+ 'src/src',
+ ],
+ },
},
- {
- 'target_name': 'protoc',
+ { 'target_name': 'protoc',
'type': 'executable',
'sources': [
'src/src/google/protobuf/compiler/code_generator.cc',