美文网首页
grpc编译步骤

grpc编译步骤

作者: 菜菜子MJ | 来源:发表于2020-05-18 01:32 被阅读0次
ERR=1
OK=0
function main() {
    rm -rf output && mkdir output
    git submodule init
    git submodule update third_party/zlib
    git submodule update --remote third_party/protobuf
    git submodule update --remote third_party/gflags
    git submodule update third_party/googletest
    git submodule update third_party/boringssl
    git submodule update third_party/benchmark
    git submodule update third_party/boringssl-with-bazel
    git submodule update third_party/cares/cares
    git submodule update third_party/bloaty
    git submodule update third_party/abseil-cpp
    git submodule update third_party/libcxxabi
    git submodule update third_party/libcxx
    git submodule update third_party/data-plane-api
    git submodule update third_party/googleapis
    git submodule update third_party/protoc-gen-validate
    git submodule update third_party/upb
    
    make -j 12 CXXFLAGS="-Wno-error=class-memaccess -Wno-error=ignored-qualifiers -Wno-error=stringop-truncation -Wno-error=cast-function-type" CFLAGS="-Wno-error=class-memaccess -Wno-error=ignored-qualifiers -Wno-error=stringop-truncation -Wno-error=cast-function-type"
 
    if [ $? -ne 0 ]; then    
        return $ERR
    fi
    
    make install prefix=output
    
    if [ $? -ne 0 ]; then
        return $ERR
    fi
    
    mv output/bin .
    mv output/share .
    mv output/lib/pkgconfig .
    
    if [ $? -ne 0 ]; then
        return $ERR
    fi
    
    return $OK
}
main "$@"

相关文章

网友评论

      本文标题:grpc编译步骤

      本文链接:https://www.haomeiwen.com/subject/nulyohtx.html