[llvm] dd8982d - Revert "[FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead of `add_llvm_library()`"

Argyrios Kyrtzidis via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 09:20:28 PDT 2022


Author: Argyrios Kyrtzidis
Date: 2022-08-18T09:20:20-07:00
New Revision: dd8982d44afbbf42c9341bd4a7c8674da27b8f19

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

LOG: Revert "[FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead of `add_llvm_library()`"

Breaks configuring `clangd` with `-DCLANGD_ENABLE_REMOTE=On` (https://github.com/llvm/llvm-project/issues/57213)

This reverts commit ba688024077c3e51c6a0949246b2a1b76284e681.

Differential Revision: https://reviews.llvm.org/D132138

Added: 
    

Modified: 
    llvm/cmake/modules/FindGRPC.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/FindGRPC.cmake b/llvm/cmake/modules/FindGRPC.cmake
index ee779d958c853..1408442fcc22d 100644
--- a/llvm/cmake/modules/FindGRPC.cmake
+++ b/llvm/cmake/modules/FindGRPC.cmake
@@ -132,12 +132,7 @@ function(generate_protos LibraryName ProtoFile)
         ARGS ${Flags} "${ProtoSourceAbsolutePath}"
         DEPENDS "${ProtoSourceAbsolutePath}")
 
-  set(LIBTYPE STATIC)
-  if(NOT XCODE)
-    # The Xcode generator doesn't handle object libraries correctly.
-    list(APPEND LIBTYPE OBJECT)
-  endif()
-  llvm_add_library(${LibraryName} ${LIBTYPE} ${GeneratedProtoSource}
+  add_llvm_library(${LibraryName} ${GeneratedProtoSource}
     PARTIAL_SOURCES_INTENDED
     LINK_LIBS PUBLIC grpc++ protobuf)
 


        


More information about the llvm-commits mailing list