[clang] 275bca6 - Revert "build: with -DCLANGD_ENABLE_REMOTE=ON, search for grpc++ dependencies too"

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 12 09:22:49 PST 2023


Author: Kadir Cetinkaya
Date: 2023-01-12T18:14:41+01:00
New Revision: 275bca657529ac07781c5f84e6485fa9d98a1c44

URL: https://github.com/llvm/llvm-project/commit/275bca657529ac07781c5f84e6485fa9d98a1c44
DIFF: https://github.com/llvm/llvm-project/commit/275bca657529ac07781c5f84e6485fa9d98a1c44.diff

LOG: Revert "build: with -DCLANGD_ENABLE_REMOTE=ON, search for grpc++ dependencies too"

This reverts commit 9f3081dc6fe8447e85741865846840bc491866e5.
Broke clangd buildbots in
https://lab.llvm.org/buildbot/#/builders/131/builds/38935.

Added: 
    

Modified: 
    clang/cmake/modules/AddGRPC.cmake
    cmake/Modules/FindGRPC.cmake

Removed: 
    


################################################################################
diff  --git a/clang/cmake/modules/AddGRPC.cmake b/clang/cmake/modules/AddGRPC.cmake
index b2f4041fbeaf5..8989bd757d247 100644
--- a/clang/cmake/modules/AddGRPC.cmake
+++ b/clang/cmake/modules/AddGRPC.cmake
@@ -4,13 +4,8 @@ function(generate_clang_protos_library LibraryName ProtoFile)
   # Take the first two args and forward the remaining to generate_proto_sources.
   cmake_parse_arguments(PARSE_ARGV 2 PROTO "" "" "")
   generate_proto_sources(ProtoSource ${ProtoFile} ${PROTO_UNPARSED_ARGUMENTS})
-  set(LINKED_GRPC_LIBRARIES protobuf gpr grpc grpc++)
 
-  if (ABSL_SYNCHRONIZATION_LIBRARY)
-    list(APPEND LINKED_GRPC_LIBRARIES absl_synchronization)
-  endif()
   add_clang_library(${LibraryName} ${ProtoSource}
     PARTIAL_SOURCES_INTENDED
-    LINK_LIBS PUBLIC  ${LINKED_GRPC_LIBRARIES})
-
+    LINK_LIBS PUBLIC grpc++ protobuf)
 endfunction()

diff  --git a/cmake/Modules/FindGRPC.cmake b/cmake/Modules/FindGRPC.cmake
index a6dec2a26a694..a559da499963e 100644
--- a/cmake/Modules/FindGRPC.cmake
+++ b/cmake/Modules/FindGRPC.cmake
@@ -82,28 +82,11 @@ else()
     endif()
   endif()
   if(NOT TARGET grpc++)
-    find_library(GPR_LIBRARY gpr ${GRPC_OPTS} REQUIRED)
-    add_library(gpr UNKNOWN IMPORTED GLOBAL)
-    message(STATUS "Using gpr: " ${GPR_LIBRARY})
-    set_target_properties(gpr PROPERTIES IMPORTED_LOCATION ${GPR_LIBRARY})
-
     find_library(GRPC_LIBRARY grpc++ ${GRPC_OPTS} REQUIRED)
     add_library(grpc++ UNKNOWN IMPORTED GLOBAL)
     message(STATUS "Using grpc++: " ${GRPC_LIBRARY})
     set_target_properties(grpc++ PROPERTIES IMPORTED_LOCATION ${GRPC_LIBRARY})
     target_include_directories(grpc++ INTERFACE ${GRPC_INCLUDE_PATHS})
-    find_library(GRPC2_LIBRARY grpc ${GRPC_OPTS} REQUIRED)
-    add_library(grpc UNKNOWN IMPORTED GLOBAL)
-    message(STATUS "Using grpc: " ${GRPC2_LIBRARY})
-    set_target_properties(grpc PROPERTIES IMPORTED_LOCATION ${GRPC2_LIBRARY})
-
-    find_library(ABSL_SYNCHRONIZATION_LIBRARY absl_synchronization ${GRPC_OPTS} QUIET)
-    if (ABSL_SYNCHRONIZATION_LIBRARY)
-      add_library(absl_synchronization UNKNOWN IMPORTED GLOBAL)
-      message(STATUS "Using absl_synchronization: " ${ABSL_SYNCHRONIZATION_LIBRARY})
-      set_target_properties(absl_synchronization PROPERTIES IMPORTED_LOCATION ${ABSL_SYNCHRONIZATION_LIBRARY})
-    endif()
-
     if (ENABLE_GRPC_REFLECTION)
       find_library(GRPC_REFLECTION_LIBRARY grpc++_reflection ${GRPC_OPTS} REQUIRED)
       add_library(grpc++_reflection UNKNOWN IMPORTED GLOBAL)


        


More information about the cfe-commits mailing list