grpc编译步骤

2020-05-18  本文已影响0人  菜菜子MJ
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 "$@"
上一篇 下一篇

猜你喜欢

热点阅读