OLD | NEW |
---|---|
(Empty) | |
1 # `infra/tools/protoc/linux-amd64` | |
2 ## Building Instructions. | |
3 | |
4 Choose a build directory. We'll use the enviornment variable `$ROOT` to | |
5 represent it. | |
6 | |
7 $ cd $ROOT | |
8 | |
9 Clone the `protobuf` repository: | |
10 | |
11 $ git clone https://github.com/google/protobuf | |
12 | |
13 Run the build. We include the following additional configuration flags: | |
14 - `--disable-shared`: Build a static library. | |
15 - `--prefix $ROOT/PREFIX`: The installation prefix. This allows us to install | |
16 locally, so we don't need root. | |
17 | |
18 Build: | |
19 | |
20 $ cd protobuf | |
21 $ ./autogen.sh | |
22 $ ./configure --disable-shared --prefix $ROOT/PREFIX | |
23 $ make -j24 install | |
24 | |
25 This will install the generator to `$ROOT/PREFIX/bin/protoc`. Afterwards, strip | |
26 the binary. This removes symbols and debugging information, including your | |
27 username, from the binary, reducing its size from ~40MiB to ~3MiB. | |
28 | |
29 $ strip -g $ROOT/PREFIX/bin/protoc | |
30 | |
31 Create package and deploy to `cipd` server. | |
32 | |
33 $ 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.
| |
34 -name "infra/tools/protoc/linux-amd64" \ | |
35 -in $ROOT/PREFIX/bin | |
OLD | NEW |