Remove gflags.

With the move to abseil's flags, this removed the now-unnecessary submodule and installation commands.
pull/24690/head
capstan 4 years ago
parent 2e142c3dcf
commit 1f670397ce
  1. 3
      .gitmodules
  2. 1
      .travis.yml
  3. 8
      BUILDING.md
  4. 179
      CMakeLists.txt
  5. 11
      bazel/grpc_deps.bzl
  6. 4
      build_handwritten.yaml
  7. 34
      cmake/gflags.cmake
  8. 11
      doc/command_line_tool.md
  9. 7
      templates/CMakeLists.txt.template
  10. 5
      templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template
  11. 1
      test/distrib/cpp/run_distrib_test_cmake_as_externalproject.sh
  12. 1
      third_party/gflags
  13. 2
      tools/buildgen/extract_metadata_from_bazel_xml.py
  14. 2
      tools/dockerfile/grpc_dist_proto/Dockerfile
  15. 1
      tools/dockerfile/grpc_scan_build/Dockerfile
  16. 5
      tools/dockerfile/test/cxx_alpine_x64/Dockerfile
  17. 2
      tools/gce/linux_kokoro_performance_worker_init.sh
  18. 1
      tools/run_tests/sanity/check_bazel_workspace.py
  19. 1
      tools/run_tests/sanity/check_submodules.sh

3
.gitmodules vendored

@ -8,9 +8,6 @@
[submodule "third_party/protobuf"]
path = third_party/protobuf
url = https://github.com/google/protobuf.git
[submodule "third_party/gflags"]
path = third_party/gflags
url = https://github.com/gflags/gflags.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git

@ -47,7 +47,6 @@ before_install:
- pod --version
# Recent pods aren't found if we don't explicitly update Cocoapods' repo.
- pod repo update
- brew install gflags
install:
- pushd $TEST_PATH
- pod install

@ -19,8 +19,6 @@ If you plan to build using CMake
If you are a contributor and plan to build and run tests, install the following as well:
```sh
$ # libgflags-dev is only required if building with make (deprecated)
$ [sudo] apt-get install libgflags-dev
$ # clang and LLVM C++ lib is only required for sanitizer builds
$ [sudo] apt-get install clang-5.0 libc++-dev
```
@ -45,12 +43,6 @@ packages from [Homebrew](https://brew.sh):
If you plan to build using CMake, follow the instructions from https://cmake.org/download/
If you are a contributor and plan to build and run tests, install the following as well:
```sh
$ # gflags is only required if building with make (deprecated)
$ brew install gflags
```
*Tip*: when building,
you *may* want to explicitly set the `LIBTOOL` and `LIBTOOLIZE`
environment variables when running `make` to ensure the version

File diff suppressed because it is too large Load Diff

@ -196,17 +196,6 @@ def grpc_deps():
],
)
if "com_github_gflags_gflags" not in native.existing_rules():
http_archive(
name = "com_github_gflags_gflags",
sha256 = "63ae70ea3e05780f7547d03503a53de3a7d2d83ad1caaa443a31cb20aea28654",
strip_prefix = "gflags-28f50e0fed19872e0fd50dd23ce2ee8cd759338e",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/gflags/gflags/archive/28f50e0fed19872e0fd50dd23ce2ee8cd759338e.tar.gz",
"https://github.com/gflags/gflags/archive/28f50e0fed19872e0fd50dd23ce2ee8cd759338e.tar.gz",
],
)
if "com_github_google_benchmark" not in native.existing_rules():
http_archive(
name = "com_github_google_benchmark",

@ -58,10 +58,6 @@ vspackages:
props: true
redist: true
version: 1.0.204.1
- name: gflags
props: false
redist: false
version: 2.1.2.1
- name: gtest
props: false
redist: false

@ -1,34 +0,0 @@
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if(gRPC_GFLAGS_PROVIDER STREQUAL "module")
if(NOT GFLAGS_ROOT_DIR)
set(GFLAGS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags)
endif()
if(EXISTS "${GFLAGS_ROOT_DIR}/CMakeLists.txt")
add_subdirectory(${GFLAGS_ROOT_DIR} third_party/gflags)
set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
else()
message(WARNING "gRPC_GFLAGS_PROVIDER is \"module\" but GFLAGS_ROOT_DIR is wrong")
endif()
elseif(gRPC_GFLAGS_PROVIDER STREQUAL "package")
# Use "CONFIG" as there is no built-in cmake module for gflags.
find_package(gflags REQUIRED CONFIG)
if(TARGET gflags::gflags)
set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
endif()
set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags CONFIG)\nendif()")
elseif(gRPC_GFLAGS_PROVIDER STREQUAL "none")
# gflags is a test-only dependency and can be avoided if we're not building tests.
endif()

@ -41,17 +41,6 @@ repository, you need to run the following command to update submodules:
git submodule update --init
```
You also need to have the gflags library installed on your system. gflags can be
installed with the following command:
Linux:
```
sudo apt-get install libgflags-dev
```
Mac systems with Homebrew:
```
brew install gflags
```
Once the prerequisites are satisfied, you can build with cmake:
```

@ -71,8 +71,6 @@
deps.append(get_absl_dep(d))
else:
deps.append(d)
if (target_dict.build == 'test' or target_dict.build == 'private') and target_dict.language == 'c++':
deps.append("${_gRPC_GFLAGS_LIBRARIES}")
return deps
def get_platforms_condition_begin(platforms):
@ -199,13 +197,9 @@
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
if(gRPC_BUILD_TESTS)
set(gRPC_GFLAGS_PROVIDER "module" CACHE STRING "Provider of gflags library")
set_property(CACHE gRPC_GFLAGS_PROVIDER PROPERTY STRINGS "module" "package")
set(gRPC_BENCHMARK_PROVIDER "module" CACHE STRING "Provider of benchmark library")
set_property(CACHE gRPC_BENCHMARK_PROVIDER PROPERTY STRINGS "module" "package")
else()
set(gRPC_GFLAGS_PROVIDER "none")
set(gRPC_BENCHMARK_PROVIDER "none")
endif()
@ -315,7 +309,6 @@
include(cmake/address_sorting.cmake)
include(cmake/benchmark.cmake)
include(cmake/cares.cmake)
include(cmake/gflags.cmake)
include(cmake/protobuf.cmake)
include(cmake/re2.cmake)
include(cmake/ssl.cmake)

@ -47,11 +47,6 @@
# Google Cloud platform API libraries
RUN pip install --upgrade google-api-python-client
# Install gflags
RUN git clone https://github.com/gflags/gflags.git && cd gflags && git checkout v2.2.0
RUN cd gflags && cmake . && make && make install
RUN ln -s /usr/local/include/gflags /usr/include/gflags
<%include file="../../run_tests_addons.include"/>
# Define the default command.

@ -26,7 +26,6 @@ apt-get update && apt-get install -y libssl-dev
rm -r third_party/benchmark/* || true
rm -r third_party/bloaty/* || true
rm -r third_party/boringssl-with-bazel/* || true
rm -r third_party/gflags/* || true
rm -r third_party/googletest/* || true
# Build helloworld example using cmake superbuild

@ -1 +0,0 @@
Subproject commit 28f50e0fed19872e0fd50dd23ce2ee8cd759338e

@ -239,7 +239,7 @@ def _external_dep_name_from_bazel_dependency(bazel_dep):
elif bazel_dep == '//external:benchmark':
return 'benchmark'
else:
# all the other external deps such as gflags, protobuf, cares, zlib
# all the other external deps such as protobuf, cares, zlib
# don't need to be listed explicitly, they are handled automatically
# by the build system (make, cmake)
return None

@ -19,7 +19,7 @@ FROM grpc/base
ADD version.txt version.txt
# Install tools needed for building protoc.
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev
RUN apt-get update && apt-get -y install libgtest-dev
# Get the protobuf source from GitHub.
RUN mkdir -p /var/local/git

@ -17,7 +17,6 @@ FROM grpc/clang:latest
RUN apt-get update && apt-get install -y \
autoconf \
libtool \
libgflags-dev \
libgtest-dev \
&& apt-get clean

@ -45,11 +45,6 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.0.post1 six==1.15.0 t
# Google Cloud platform API libraries
RUN pip install --upgrade google-api-python-client
# Install gflags
RUN git clone https://github.com/gflags/gflags.git && cd gflags && git checkout v2.2.0
RUN cd gflags && cmake . && make && make install
RUN ln -s /usr/local/include/gflags /usr/include/gflags
RUN mkdir /var/local/jenkins

@ -74,7 +74,7 @@ sudo apt-get install -y python-psutil python3-psutil
sudo apt-get install -y google-cloud-sdk
# C++ dependencies
sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang
sudo apt-get install -y libgtest-dev libc++-dev clang
# Python dependencies
sudo pip install --upgrade pip==19.3.1

@ -49,7 +49,6 @@ _GRPC_DEP_NAMES = [
'com_google_protobuf',
'com_google_googletest',
'rules_cc',
'com_github_gflags_gflags',
'com_github_google_benchmark',
'com_github_cares_cares',
'com_google_absl',

@ -32,7 +32,6 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules"
29c6e0e27268f5a43e039cd2ed4e849d6b736fc1 third_party/boringssl-with-bazel (remotes/origin/master-with-bazel)
e982924acee7f7313b4baa4ee5ec000c5e373c30 third_party/cares/cares (cares-1_15_0)
9997e1137cdb59e622af13e57ca915a2f3c9f84f third_party/envoy-api (heads/master)
28f50e0fed19872e0fd50dd23ce2ee8cd759338e third_party/gflags (v2.2.0-5-g30dbc81)
80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb)
c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/googletest (6e2f397)
15ae750151ac9341e5945eb38f8982d59fb99201 third_party/libuv (v1.34.0)

Loading…
Cancel
Save