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