aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/grpc/README.bazel.md
diff options
context:
space:
mode:
authorGravatar Lukacs T. Berki <lberki@google.com>2016-04-07 14:42:11 +0200
committerGravatar Lukacs T. Berki <lberki@google.com>2016-04-07 14:43:11 +0200
commitc58bc16485b0043e1ec42decfa2790219e1cd007 (patch)
tree60a864b6af0f2099885e9c0d6a129816915e6d38 /third_party/grpc/README.bazel.md
parent09309738fab434d5ceb2206a8b5eb144fc60c70e (diff)
Add the C++ gRPC implementation and the Java gRPC proto compiler plugin to third_party .
The Java code of gRPC is already there. Change-Id: I29091b11dc88a1946fd637fe678b269abfd8c035
Diffstat (limited to 'third_party/grpc/README.bazel.md')
-rw-r--r--third_party/grpc/README.bazel.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/third_party/grpc/README.bazel.md b/third_party/grpc/README.bazel.md
new file mode 100644
index 0000000000..dacbe7ff7a
--- /dev/null
+++ b/third_party/grpc/README.bazel.md
@@ -0,0 +1,42 @@
+How to update the C++ sources of gRPC:
+
+1. `git clone http://github.com/grpc/grpc.git` in a convenient directory
+2. `git checkout <tag>` (current is `release-0_13`, commithash `78e04bbd`)
+3. `mkdir -p third_party/grpc/src`
+4. `cp -R <gRPC git tree>/src/{compiler,core-cpp} third_party/grpc/src`
+5. `cp -R <gRPC git tree>/include third_party/grpc`
+6. Update BUILD files by copying the rules from the BUILD file of gRPC
+
+
+How to update the Java plugin:
+
+For any architecture other than 64-bit Linux, downloading it from Maven Central
+is fine. For 64-bit Linux, the plugin needs to be built statically:
+
+1. `git clone http://github.com/grpc/grpc-java`
+2. `git checkout <tag>` (current is `v0.13.2`, commithash `5933cea9`)
+3. Modify the linker args in compiler/build.gradle according to the instructions below
+4. Download the sources of protobuf (see `third_party/protobuf/README.md`) and compile it
+5. `export LDFLAGS=<protobuf dir>/src/.libs`
+6. `export CXXFLAGS=<protobuf dir>/src`
+7. `cd compiler; ../gradlew java_pluginExecutable`
+
+In `compiler/build.gradle`, this list of linker arguments:
+
+```
+ linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc",
+ "-static-libstdc++",
+ "-Wl,-Bdynamic", "-lpthread", "-s"
+```
+
+needs to be replaced with this:
+
+```
+ linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc",
+ "-static-libstdc++",
+ "-lpthread", "-lc", "-s", "-static"
+```
+
+How to update the Java code:
+
+Simply download from Maven Central.