[PATCH] D132033: [FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead of `add_llvm_library()`

Argyrios Kyrtzidis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 09:43:07 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGba688024077c: [FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead… (authored by akyrtzi).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132033/new/

https://reviews.llvm.org/D132033

Files:
  llvm/cmake/modules/FindGRPC.cmake


Index: llvm/cmake/modules/FindGRPC.cmake
===================================================================
--- llvm/cmake/modules/FindGRPC.cmake
+++ llvm/cmake/modules/FindGRPC.cmake
@@ -132,7 +132,12 @@
         ARGS ${Flags} "${ProtoSourceAbsolutePath}"
         DEPENDS "${ProtoSourceAbsolutePath}")
 
-  add_llvm_library(${LibraryName} ${GeneratedProtoSource}
+  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}
     PARTIAL_SOURCES_INTENDED
     LINK_LIBS PUBLIC grpc++ protobuf)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132033.453318.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/ec43bebd/attachment.bin>


More information about the llvm-commits mailing list