blob: a42e244383f092281a90145816fb36bb6728cff8 [file] [log] [blame]
Name: Protocol Buffers
Short Name: protobuf
URL: https://github.com/google/protobuf
License: BSD
License File: LICENSE
Version: 3.9.0
Revision: cf242503ec157a7dda8a6eda48712dd26c81d2e6
Security Critical: yes
Steps used to create the current version:
1. Pull the release from https://github.com/google/protobuf/releases (Source
code zip)
2. Add build files (BUILD.gn, proto_library.gni).
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.
Other things to care about are defines required by protobuf on various
platforms, warnings generated by compilers, and new dependencies introduced.
3. Add DEPS and OWNERS.
4. Add mirclient.cc and mirclient.map.
5. Add gen_extra_chromium_files.
6. Get open-source library six.py from https://pypi.python.org/pypi/six/ and add
it to protobuf/third_party/six/six.py.
7. Apply patches in patches/ (see the description below):
$ for patch in patches/*; do patch -s -p1 < $patch; done
For future releases, it will be worth looking into which patches still need
to be applied. In case of conflict, update those patches accordingly and save
them back in place (i.e. in patches directory).
8. Generate descriptor_pb2.py using the script "gen_extra_chromium_files" in
the same directory as this file.
9. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path.
10. Update README.chromium.
Note about libmirclient:
On Ubuntu, Chromium has an indirect dependency on the system
libprotobuf-lite through libmirclient (through GTK). The symbols in
the system library conflict with Chromium's libprotobuf-lite used on
component builds.
mirclient.* are added to stub out libmirclient.so.9 to prevent loading
the system libprotobuf-lite. Chromium's replacement libmirclient will
get loaded, but its symbols will never be used directly or indirectly.
Description of the patches:
- 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 built as a
component (see http://crrev.com/179806).
- 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.
- 0021-Fix-protobuf-s-library-.gitinore-file.patch
Un-ignores python/google/protobuf/descriptor_pb2.py
- 0026-json_objectwriter_override.patch
Corrects/adds override in json_objectwriter.h and
default_value_objectwriter.h
(https://github.com/protocolbuffers/protobuf/pull/6515).
- 0027-explicit-namespace.patch
clang-cl requires friend class declarations to be fully namespaced.
(https://github.com/protocolbuffers/protobuf/pull/6516)
- 0028-fix-repeated-field-export.patch
clang and clang-cl differ on how to do template instantiation exporting (see
https://crbug.com/994001). This adds some macro magic copied from chromium
//base/export_template.h.
(https://github.com/protocolbuffers/protobuf/pull/6535)
- 0029-Fix-order-for-mutex-macros.patch
__declspec(dllexport) must come after __atrribute__(()) on clang-cl
(https://github.com/protocolbuffers/protobuf/pull/6524)
- 0030-fix-use_unaligned-not-defined-warning.patch
Fixes "GOOGLE_PROTOBUF_USE_UNALIGNED is not defined" compilation warning