[clang-tools-extra] 99b01cf - Revert "[clangd] Enable reflection for clangd-index-server"
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 10 05:12:50 PST 2021
Author: Kadir Cetinkaya
Date: 2021-03-10T14:12:37+01:00
New Revision: 99b01cf28db9db1a3ec0e25367bd325b7aca6d43
URL: https://github.com/llvm/llvm-project/commit/99b01cf28db9db1a3ec0e25367bd325b7aca6d43
DIFF: https://github.com/llvm/llvm-project/commit/99b01cf28db9db1a3ec0e25367bd325b7aca6d43.diff
LOG: Revert "[clangd] Enable reflection for clangd-index-server"
This reverts commit 8080ea4c4b8c456c72c617587cc32f174b3105c1.
As discussed offline we should only do that for debug builds.
Added:
Modified:
clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
clang-tools-extra/clangd/index/remote/server/Server.cpp
llvm/cmake/modules/FindGRPC.cmake
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
index 3ba0c476df0c..e6959db6bbd8 100644
--- a/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/server/CMakeLists.txt
@@ -17,6 +17,4 @@ target_link_libraries(clangd-index-server
RemoteIndexProto
RemoteIndexServiceProto
clangdRemoteMarshalling
-
- grpc++_reflection
)
diff --git a/clang-tools-extra/clangd/index/remote/server/Server.cpp b/clang-tools-extra/clangd/index/remote/server/Server.cpp
index 768f3c9fd143..3de2c38f7c08 100644
--- a/clang-tools-extra/clangd/index/remote/server/Server.cpp
+++ b/clang-tools-extra/clangd/index/remote/server/Server.cpp
@@ -30,7 +30,6 @@
#include "llvm/Support/VirtualFileSystem.h"
#include <chrono>
-#include <grpc++/ext/proto_server_reflection_plugin.h>
#include <grpc++/grpc++.h>
#include <grpc++/health_check_service_interface.h>
#include <memory>
@@ -314,7 +313,6 @@ void runServerAndWait(clangd::SymbolIndex &Index, llvm::StringRef ServerAddress,
RemoteIndexServer Service(Index, IndexRoot);
grpc::EnableDefaultHealthCheckService(true);
- grpc::reflection::InitProtoReflectionServerBuilderPlugin();
grpc::ServerBuilder Builder;
Builder.AddListeningPort(ServerAddress.str(),
grpc::InsecureServerCredentials());
diff --git a/llvm/cmake/modules/FindGRPC.cmake b/llvm/cmake/modules/FindGRPC.cmake
index d39d10e4e93c..8fdb3506dff1 100644
--- a/llvm/cmake/modules/FindGRPC.cmake
+++ b/llvm/cmake/modules/FindGRPC.cmake
@@ -22,8 +22,6 @@ if (GRPC_INSTALL_PATH)
add_library(protobuf ALIAS protobuf::libprotobuf)
set_target_properties(gRPC::grpc++ PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(grpc++ ALIAS gRPC::grpc++)
- set_target_properties(gRPC::grpc++_reflection PROPERTIES IMPORTED_GLOBAL TRUE)
- add_library(grpc++_reflection ALIAS gRPC::grpc++_reflection)
set(GRPC_CPP_PLUGIN $<TARGET_FILE:gRPC::grpc_cpp_plugin>)
set(PROTOC ${Protobuf_PROTOC_EXECUTABLE})
@@ -73,9 +71,6 @@ else()
add_library(grpc++ UNKNOWN IMPORTED GLOBAL)
message(STATUS "Using grpc++: " ${GRPC_LIBRARY})
set_target_properties(grpc++ PROPERTIES IMPORTED_LOCATION ${GRPC_LIBRARY})
- find_library(GRPC_REFLECTION_LIBRARY grpc++_reflection $GRPC_OPTS REQUIRED)
- add_library(grpc++_reflection UNKNOWN IMPORTED GLOBAL)
- set_target_properties(grpc++_reflection PROPERTIES IMPORTED_LOCATION ${GRPC_REFLECTION_LIBRARY})
find_library(PROTOBUF_LIBRARY protobuf $PROTOBUF_OPTS REQUIRED)
message(STATUS "Using protobuf: " ${PROTOBUF_LIBRARY})
add_library(protobuf UNKNOWN IMPORTED GLOBAL)
More information about the cfe-commits
mailing list