xref: /aosp_15_r20/external/cronet/third_party/protobuf/pkg/README.md (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker# Protobuf packaging
2*6777b538SAndroid Build Coastguard Worker
3*6777b538SAndroid Build Coastguard WorkerThis directory contains Bazel rules for building packaging and distribution
4*6777b538SAndroid Build Coastguard Workerartifacts.
5*6777b538SAndroid Build Coastguard Worker
6*6777b538SAndroid Build Coastguard Worker*Everything in this directory should be considered internal and subject to
7*6777b538SAndroid Build Coastguard Workerchange.*
8*6777b538SAndroid Build Coastguard Worker
9*6777b538SAndroid Build Coastguard Worker## Protocol compiler binary packaging
10*6777b538SAndroid Build Coastguard Worker
11*6777b538SAndroid Build Coastguard WorkerThe protocol compiler is used in binary form in various places. There are rules
12*6777b538SAndroid Build Coastguard Workerwhich package it, along with commonly used `.proto` files, for distribution.
13*6777b538SAndroid Build Coastguard Worker
14*6777b538SAndroid Build Coastguard Worker## Source distribution packaging
15*6777b538SAndroid Build Coastguard Worker
16*6777b538SAndroid Build Coastguard WorkerProtobuf releases include source distributions, sliced by target language (C++,
17*6777b538SAndroid Build Coastguard WorkerJava, etc.). There are rules in this package to define those source archives.
18*6777b538SAndroid Build Coastguard WorkerThese depend upon `pkg_files` rules elsewhere in the repo to get the contents.
19*6777b538SAndroid Build Coastguard Worker
20*6777b538SAndroid Build Coastguard WorkerThe source distribution files should include the outputs from `autogen.sh`, but
21*6777b538SAndroid Build Coastguard Workerthis isn't something we can reliably do from Bazel. To produce fully functioning
22*6777b538SAndroid Build Coastguard Workersource distributions, run `autogen.sh` before building the archives (this
23*6777b538SAndroid Build Coastguard Workerpopulates the necessary files directly into the source tree).
24*6777b538SAndroid Build Coastguard Worker
25*6777b538SAndroid Build Coastguard Worker## C++ runtime binary distribution
26*6777b538SAndroid Build Coastguard Worker
27*6777b538SAndroid Build Coastguard WorkerThe `cc_dist_library` rule creates composite libraries from several other
28*6777b538SAndroid Build Coastguard Worker`cc_library` targets. Bazel uses a "fine-grained" library model, where each
29*6777b538SAndroid Build Coastguard Worker`cc_library` produces its own library artifacts, without transitive
30*6777b538SAndroid Build Coastguard Workerdependencies. The `cc_dist_library` rule combines several other libraries
31*6777b538SAndroid Build Coastguard Workertogether, creating a single library that may be suitable for distribution.
32