aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/README.md
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2016-09-28 09:15:41 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-09-28 09:18:27 +0000
commit0d36f410370ed99cbd57359d7444269faec134f8 (patch)
tree672edc273b68c55ecc415bf8c1f23df85db3f32b /third_party/protobuf/README.md
parentaf25cea3d0b2663226a3718fdfa619457a43a8b9 (diff)
*** Reason for rollback *** Breaks Bazel Windows Bootstrap Fix https://github.com/bazelbuild/bazel/issues/1851 *** Original change description *** Updates protobuf in bazel to version 3.0.0. -- MOS_MIGRATED_REVID=134510744
Diffstat (limited to 'third_party/protobuf/README.md')
-rw-r--r--third_party/protobuf/README.md52
1 files changed, 25 insertions, 27 deletions
diff --git a/third_party/protobuf/README.md b/third_party/protobuf/README.md
index 2106efbfa0..bf93a9893d 100644
--- a/third_party/protobuf/README.md
+++ b/third_party/protobuf/README.md
@@ -1,45 +1,43 @@
-How to update the binaries other than `protoc-linux-x86_64.exe` and `protoc-mingw.exe`:
+How to update the binaries other than `protoc-linux-x86_64.exe`:
1. Go to http://search.maven.org/
2. Search for g:"com.google.protobuf"
-3. Download the "jar" link from protobuf-java and put them in `<Bazel tree>/third_party/protobuf/<version>`
-4. Download all binaries from "protoc" and put them in `<Bazel tree>/third_party/protobuf/<version>`
-5. Set executable bit: `chmod +x *.exe`
+3. Download the "jar" link from protobuf-java.
+4. Download all binaries from "protoc".
+5. Strip version number from protoc files: for `i in *.exe; do mv $i $(echo $i | sed s/3.0.0-beta-2-//); done`
+6. Set executable bit: `chmod +x *.exe`
+7. Update `third_party/BUILD` to point to the new jar file.
+8. Done.
-The 64-bit Linux version of the proto compiler (`protoc-linux-x86_64.exe`) is
-linked statically. To update it, do the following steps on an x86_64 machine:
+The 64-bit Linux version of the proto compiler is linked statically. To update it, do
+the following steps on an x86_64 machine:
1. `git clone http://github.com/google/protobuf.git`
-2. `git checkout <commithash>`
+2. `git checkout <commithash>` (current is `d5fb408d` or `3.0.0-beta-2`)
3. `./autogen.sh`
4. `LDFLAGS=-static ./configure`
5. Change `LDFLAGS = -static` to `LDFLAGS = -all-static` in `src/Makefile`.
6. `make`
-7. `cp src/protoc <Bazel tree>/third_party/protobuf/<version>/protoc-<version>-linux-x86_64.exe` .
+7. `cp src/protoc <Bazel tree>/third_party/protobuf/protoc-linux-x86_64.exe` .
+
+How to update `protobuf.bzl` and the `src/` directory:
+
+1. `git clone http://github.com/google/protobuf.git`
+2. `git checkout <commithash>` (current is `d5fb408d` or `3.0.0-beta-2`)
+2. `mkdir -p third_party/protobuf/src/google` in the root of the Bazel tree.
+3. `cp -R <root of protobuf tree>/src/google/protobuf third_party/protobuf/src/google`
+4. Update rules in `third_party/protobuf/BUILD` with the rules in the protobuf repository.
+5. Done.
How to update `protoc-mingw.exe`:
This is pretty much the same steps as for x86_64 above, but they need to be done
-from MingW shell on a Windows machine ([https://sourceforge.net/projects/msys2/files/]).
+from MingW shell on Windows machine ([https://sourceforge.net/projects/msys2/files/]).
1. `git clone http://github.com/google/protobuf.git`
-2. `git checkout <commithash>`
+2. `git checkout <commithash>` (current is `d5fb408d` or `3.0.0-beta-2`)
3. `./autogen.sh`
6. `make`
-7. `cp src/protoc.exe <Bazel tree>/third_party/protobuf/<version>/protoc-<version>-mingw.exe` .
+7. `cp src/protoc.exe <Bazel tree>/third_party/protobuf/protoc-mingw.exe` .
-How to update `protobuf.bzl` and the `src/` directory:
-
-1. `git clone http://github.com/google/protobuf.git`
-2. `git checkout <commithash>`
-2. `mkdir -p third_party/protobuf/<version>/src/google` in the root of the Bazel tree.
-3. `cp -R <root of protobuf tree>/src/google/protobuf third_party/protobuf/<version>/src/google`
-
-Finally, update the rules:
-
-1. Add a BUILD file to `third_party/protobuf/<version>/`. Use the BUILD file
- for the previous version as a template. Update the `cc_library` rules to
- match the rules in the BUILD file in the protobuf repository. Also copy
- `protobuf.bzl` from the protobuf repository into
- `third_party/protobuf/<version>/`.
-2. Modify `third_party/protobuf/BUILD` to point to the new rules.
-3. Delete the old version of protobuf.
+How to update anything else in this directory: follow usual procedure as described on
+https://www.bazel.io/contributing.html