blob: 49c5a60f0eb65060d7fe4365b099bbbe5168fd26 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001#!/bin/bash
2
James Kuszmaul8e62b022022-03-22 09:33:25 -07003grpc_1_39_0_githash=58602e20a3f3e48f24a4114c757099b25b947f7b
Austin Schuhe89fa2d2019-08-14 20:24:23 -07004
5function build_grpc () {
6 git clone https://github.com/grpc/grpc.git google/grpc
7 cd google/grpc
James Kuszmaul8e62b022022-03-22 09:33:25 -07008 git checkout ${grpc_1_39_0_githash}
Austin Schuhe89fa2d2019-08-14 20:24:23 -07009 git submodule update --init
James Kuszmaul8e62b022022-03-22 09:33:25 -070010 # Apply boringssl build patch
11 cd third_party/boringssl-with-bazel
12 git apply ../../../../grpc/boringssl.patch
13 cd ../..
14 mkdir ../grpc_build
15 cd ../grpc_build
16 cmake ../grpc -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DABSL_ENABLE_INSTALL=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=`pwd`/../grpc/install
17 cmake --build . --target install ${JOBS:+-j$JOBS}
Austin Schuhe89fa2d2019-08-14 20:24:23 -070018 cd ../..
19}
20
21GRPC_INSTALL_PATH=`pwd`/google/grpc/install
22PROTOBUF_DOWNLOAD_PATH=`pwd`/google/grpc/third_party/protobuf
23
24build_grpc