Chromium Code Reviews| Index: third_party/protobuf/README.chromium |
| diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README.chromium |
| index 507037960d0eb6407c29d9cf03cfd189f57c717d..c5d13fb8cf8b47baf4e2a83911f7f0c45dc3e6fb 100644 |
| --- a/third_party/protobuf/README.chromium |
| +++ b/third_party/protobuf/README.chromium |
| @@ -1,52 +1,94 @@ |
| Name: Protocol Buffers |
| Short Name: protobuf |
| -URL: http://protobuf.googlecode.com/svn/trunk |
| +URL: https://github.com/google/protobuf |
| License: BSD |
| -License File: COPYING.txt |
| -Version: unknown |
| -Revision: r476 |
| +License File: LICENSE |
| +Version: 3.0.0-beta-2 |
| +Revision: d5fb408ddc281ffcadeb08699e65bb694656d0bd |
| Security Critical: yes |
| -Local files (not taken from upstream): |
| -README.chromium |
| -config.h |
| -descriptor2_pb.py |
| +Steps used to create the current version: |
| +1. Pull the release from https://github.com/google/protobuf/releases |
| +2. Use the cleanup_release.sh script to remove unnecessary files. |
| +3. Add build files (BUILD.gn, proto_library.gni, protobuf.gyp, |
| + protobuf_lite.gypi, protobuf_nacl.gyp). |
| -A protobuf.gyp file has been added for building with Chromium. |
| + Be sure to update the list of source files, as additional .cc files and |
| + headers might have been added -- you need to find the transitive closure of |
| + include files required by targets. |
| -This code has been patched to support unknown field retention in protobuf-lite. |
| -See r62331 for the patch. |
| + Other things to care about are defines required by protobuf on various |
| + platforms, warnings generated by compilers, and new dependencies introduced. |
| +4. Get open-source library six.py from https://pypi.python.org/pypi/six/ and add |
| + it to protobuf/third_party/six/six.py. |
| +5. Apply patches in patches/ (see the description below): |
| -This code has been patched to ensure that files in the target protobuf_lite |
| -do not include headers from protobuf_full. See r173228 for the patch. |
| + $ for patch in patches/*; do patch -s -p1 < $patch; done |
| -This code has been patched to make the target protobuf_lite a component so that |
| -targets that depend on it can be componentized. See http://crbug.com/172800 for |
| -details, and r179806 for the patch. |
| + For future releases, it will be worth looking into which patches still need |
| + to be applied. |
| +5. Generate descriptor_pb2.py using something like the following steps. Make |
| + sure you've regenerated your buildfiles and will build protoc from the |
| + newly-modified sources above. |
| -Revision 504 was cherry-picked from upstream. |
| -Revision 512 was cherry-picked from upstream. |
| -Revision 516 was cherry-picked from upstream. |
| -Revision 517 was cherry-picked from upstream. |
| -Revision 522 was cherry-picked from upstream. |
| -Revision 523 was cherry-picked from upstream. |
| -Revision 524 was cherry-picked from upstream. |
| -Revision 573 was cherry-picked from upstream. |
| -The `&file->options() != NULL &&` was removed from descriptor.cc |
| -References to `vector` were changed to `std::vector` in extension_set.h |
| -and unknown_field_set.h |
| + $ cd $SRC_DIR |
| + $ ninja -C out/Debug protoc |
| + $ cd third_party/protobuf/src |
| + $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor.proto |
| -GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings |
| -in binary size. |
| +6. Add __init__.py to protobuf/ that adds third_party/six/ to Python path. |
|
Peter Kasting
2016/04/15 01:12:59
Nit: Add -> Add an
xyzzyz
2016/04/15 20:50:36
Done.
|
| +7. Update README.chromium. |
| -A BUILD.gn file has been added for building with GN. |
| +Description of the patches: |
| -Cherry-pick pherl changes to make protobuf build on VS2015. |
| +- 0001-ignore-option-retain-unknown-fields.patch |
| -Cherry-pick c3cb53b (fix "sometimes-uninitialized" warning). |
| + Previous versions of protobuf in Chromium carried a local patch that retained |
| + unknown fields in protobuf_lite mode. It was enabled by setting option |
| + retain_unknown_fields = true in .proto file. Now that it is enabled by |
| + default, this option is no longer recognized by protobuf, and so I had to |
| + patch it so that I don't have to fix all .proto files in Chromium in a single |
| + CL. |
| -Cherry-pick https://github.com/google/protobuf/commit/56a90a2081379a5 |
| + I plan to remove those occurences, and then this patch will no longer be |
| + necessary. |
| -Cherry-pick https://github.com/google/protobuf/commit/69d660b39ceabea |
| +- 0002-remove-support-for-unnecessary-languages.patch |
| -Cherry-pick https://github.com/google/protobuf/commit/a74e912a8be1274 |
| + This patch removes support for C#, Ruby, Objective-C, JS and other languages not |
| + used in Chromium from protoc, to decrease the package size. |
| + |
| +- 0003-remove-static-initializers.patch |
| + |
| + This patch removes all static initializers from Chromium. The change in Status |
| + class is not completely compatible with upstream, but it's compatible enough |
| + to work in Chromium, which doesn't use this functionality yet. The work on |
| + upstreaming the removal of static initializers is in progress: |
| + https://github.com/google/protobuf/issues/1404 |
| + |
| +- 0004-fix-integer-types-and-shared-library-exports.patch |
| + |
| + This patch makes protobuf int64 to be int64_t (as opposed to long long in |
| + upstream), and similarly for other integer types. It also allows exporting |
| + protobuf symbols in Linux .so libraries, so that protobuf can be build as a |
|
Peter Kasting
2016/04/15 01:12:59
Nit: build -> built
xyzzyz
2016/04/15 20:50:36
Done.
|
| + component (see http://crrev.com/179806). |
| + |
| +- 0005-fix-no-threadlocal-on-mac.patch |
| + |
| + Apple's Clang doesn't support thread-local variables on Mac. |
| + |
| +- 0006-fix-clang-type-errors.patch |
| + |
| + New versions of Clang have type checking semantics that check the conformance |
| + with the C++ standard more thorougly, which makes them a bit more |
| + restrictive. This is actually cherry-pick from protobuf upstream (commits |
|
Peter Kasting
2016/04/15 01:12:59
Nit: Minor grammar issues; most direct replacement
xyzzyz
2016/04/15 20:50:36
Done.
|
| + 3cc35adb6dca9057a790d253b9f5e2b9b000a106 and |
| + 58f07644eab25f68973ecab4bdc43fc318c26131). |
| + |
| +- 0007-uninline_googleonce.patch |
| +- 0008-uninline_get_empty_string.patch |
| +- 0009-uninline-arenastring.patch |
| +- 0010-uninline-generated-code.patch |
| + |
| + These patches uninline some functions, resulting in a significant reduction |
| + (somewhere between 500 KB and 1 MB) of binary size. |