Index: bootstrap/cipd/doc/infra/tools/protoc/linux-amd64/README.md |
diff --git a/bootstrap/cipd/doc/infra/tools/protoc/linux-amd64/README.md b/bootstrap/cipd/doc/infra/tools/protoc/linux-amd64/README.md |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ea1bd9e645d7dddd98c5004c1b7a1daa47f2a7f5 |
--- /dev/null |
+++ b/bootstrap/cipd/doc/infra/tools/protoc/linux-amd64/README.md |
@@ -0,0 +1,35 @@ |
+# `infra/tools/protoc/linux-amd64` |
+## Building Instructions. |
+ |
+Choose a build directory. We'll use the enviornment variable `$ROOT` to |
+represent it. |
+ |
+ $ cd $ROOT |
+ |
+Clone the `protobuf` repository: |
+ |
+ $ git clone https://github.com/google/protobuf |
+ |
+Run the build. We include the following additional configuration flags: |
+- `--disable-shared`: Build a static library. |
+- `--prefix $ROOT/PREFIX`: The installation prefix. This allows us to install |
+ locally, so we don't need root. |
+ |
+Build: |
+ |
+ $ cd protobuf |
+ $ ./autogen.sh |
+ $ ./configure --disable-shared --prefix $ROOT/PREFIX |
+ $ make -j24 install |
+ |
+This will install the generator to `$ROOT/PREFIX/bin/protoc`. Afterwards, strip |
+the binary. This removes symbols and debugging information, including your |
+username, from the binary, reducing its size from ~40MiB to ~3MiB. |
+ |
+ $ strip -g $ROOT/PREFIX/bin/protoc |
+ |
+Create package and deploy to `cipd` server. |
+ |
+ $ cipd create \ |
Vadim Sh.
2015/09/24 19:28:30
nit: slap a git_commit:... tag too with SHA1 of pr
dnj
2015/09/24 20:29:56
Done.
|
+ -name "infra/tools/protoc/linux-amd64" \ |
+ -in $ROOT/PREFIX/bin |