diff options
author | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 15:59:15 +0000 |
---|---|---|
committer | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 15:59:15 +0000 |
commit | 51533e1bea52a6a7d16578bca8d676e00801b120 (patch) | |
tree | fc19c65b14bf087f6ce57731e76fd6b185c2eb86 /third_party | |
parent | 541dcd5e5bde64a8f517e8f002573288baf37f35 (diff) | |
download | chromium_src-51533e1bea52a6a7d16578bca8d676e00801b120.zip chromium_src-51533e1bea52a6a7d16578bca8d676e00801b120.tar.gz chromium_src-51533e1bea52a6a7d16578bca8d676e00801b120.tar.bz2 |
third_party/protobuf: update to upstream r412.
1) Got an upstream diff 411:412 from svn
2) Applied
3) Modified protobuf.gyp to make it platform independent thanks to the new
guards added in atomicops_internals_x86_gcc.cc and
atomicops_internals_x86_msvc.cc.
Note that the previous change adding atomicops added a significant
complexity to protobuf.gyp to handle platform-specific source files. Because
it was using target_arch only, it did not even work properly. Indeed
protobuf_lite needs to deal with the host architecture when it is built to
be used by protoc.
Review URL: http://codereview.chromium.org/9706016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126922 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
4 files changed, 12 insertions, 32 deletions
diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.chromium index 6e06aca..df9f1c0 100644 --- a/third_party/protobuf/README.chromium +++ b/third_party/protobuf/README.chromium @@ -3,7 +3,7 @@ Short Name: protobuf URL: http://protobuf.googlecode.com/svn/trunk License File: COPYING.txt Version: unknown -Revision: r411 +Revision: r412 Security Critical: yes Local files (not taken from upstream): diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp index dc6a642..a0ab85a 100644 --- a/third_party/protobuf/protobuf.gyp +++ b/third_party/protobuf/protobuf.gyp @@ -41,6 +41,13 @@ 'toolsets': ['host', 'target'], 'sources': [ 'src/google/protobuf/stubs/atomicops.h', + 'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h', + 'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h', + 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc', + 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h', + 'src/google/protobuf/stubs/atomicops_internals_x86_macosx.h', + 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc', + 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h', 'src/google/protobuf/stubs/common.h', 'src/google/protobuf/stubs/once.h', 'src/google/protobuf/stubs/platform_macros.h', @@ -72,36 +79,6 @@ 'src/google/protobuf/io/zero_copy_stream_impl_lite.cc', '<(config_h_dir)/config.h', ], - 'conditions': [ - ['OS == "win"', { - 'sources+': [ - 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc', - 'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h', - ], - }], - ['OS == "mac"', { - 'sources+': [ - 'src/google/protobuf/stubs/atomicops_internals_x86_macosx.h', - ], - }], - ['"<(target_arch)" == "arm"', { - 'sources+': [ - 'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h', - ], - }], - ['"<(target_arch)" == "mips"', { - 'sources+': [ - 'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h', - ], - }], - ['"<(target_arch)" == "ia32" or "<(target_arch)" == "x64"', { - 'sources+': [ - 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc', - 'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h', - ], - }], - ], - 'include_dirs': [ '<(config_h_dir)', 'src', diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc index 7552721..937aa5a 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc @@ -33,7 +33,7 @@ #include <cstring> -#include "atomicops.h" +#include <google/protobuf/stubs/atomicops.h> // This file only makes sense with atomicops_internals_x86_gcc.h -- it // depends on structs that are defined in that file. If atomicops.h diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc index a4c7c42..4686bc4 100644 --- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc +++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc @@ -33,6 +33,8 @@ #include <google/protobuf/stubs/atomicops.h> +#ifdef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_X86_MSVC_H_ + #include <windows.h> namespace google { @@ -103,4 +105,5 @@ Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, } // namespace protobuf } // namespace google +#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_X86_MSVC_H_ #endif // GOOGLE_PROTOBUF_NO_THREADSAFETY |