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..eb72fb991894a8322aa0018af64428fad73b90f7 100644 |
| --- a/third_party/protobuf/README.chromium |
| +++ b/third_party/protobuf/README.chromium |
| @@ -1,52 +1,83 @@ |
| 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). |
|
Peter Kasting
2016/04/13 02:11:44
One thing I'm concerned has been lost between my p
xyzzyz
2016/04/14 00:23:56
I'll update the comment to not imply to copy them
|
| +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): |
| -A protobuf.gyp file has been added for building with Chromium. |
| + $ for patch in patches/*; do patch -s -p1 < $patch; done |
| -This code has been patched to support unknown field retention in protobuf-lite. |
| -See r62331 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. |
| -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. |
| + $ cd $SRC_DIR |
| + $ ninja -C out/Debug protoc |
| + $ cd third_party/protobuf/src |
| + $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor.proto |
| -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. |
| + Copy the resulting descriptor_pb2.py to protobuf/. |
|
Peter Kasting
2016/04/13 02:11:44
This line is inaccurate and should simply be remov
xyzzyz
2016/04/14 00:23:56
Done.
|
| +6. Copy __init__.py to protobuf/ (it adds third_party/six/ to Python path). |
|
Peter Kasting
2016/04/13 02:11:44
Copy it from where?
xyzzyz
2016/04/14 00:23:56
I'm not sure how to best express that one should j
|
| +7. Update README.chromium. |
| -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 |
| +Description of the patches: |
| -GetEmptyString() and GoogleOnceInit() have been uninlined, for a large savings |
| -in binary size. |
| +- 0001-ignore-option-retain-unknown-fields.patch |
| -A BUILD.gn file has been added for building with GN. |
| + 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 pherl changes to make protobuf build on VS2015. |
| + I plan to remove those occurences, and then this patch will no longer be |
| + necessary. |
| -Cherry-pick c3cb53b (fix "sometimes-uninitialized" warning). |
| +- 0002-remove-support-for-unnecessary-languages.patch |
| -Cherry-pick https://github.com/google/protobuf/commit/56a90a2081379a5 |
| + This patch removes support for C#, Ruby, Objective-C, JS and other languages not |
| + used in Chromium from protoc, to decrease the package size. |
| -Cherry-pick https://github.com/google/protobuf/commit/69d660b39ceabea |
| +- 0003-remove-static-initializers.patch |
| -Cherry-pick https://github.com/google/protobuf/commit/a74e912a8be1274 |
| + 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. |
|
Peter Kasting
2016/04/13 02:11:44
Nit: If we land with this patch, it should refer t
|
| + |
| +- 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. |
|
Peter Kasting
2016/04/13 02:11:44
Why are the int64_t and componentization changes c
xyzzyz
2016/04/14 00:23:56
They're in a single patch, because I didn't know h
Peter Kasting
2016/04/15 01:12:59
Do they actually depend on each other? I just ass
|
| + |
| +- 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. |
|
Peter Kasting
2016/04/13 02:11:44
If you've cherry-picked, say exactly which revisio
xyzzyz
2016/04/14 00:23:56
Done.
|
| + |
| +- 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. |