[CMake] Update FindGPRC to use add_llvm_library
authorSteven Wu <stevenwu@apple.com>
Mon, 15 Aug 2022 15:54:01 +0000 (08:54 -0700)
committerSteven Wu <stevenwu@apple.com>
Mon, 15 Aug 2022 15:54:15 +0000 (08:54 -0700)
commitcae76582b07f392659a3c5791eb5f1ba44a1e868
tree9c3acaf93419df84b5e8d9cd79ca46881dfbd64b
parentb8a1b698afb2fc84819c7596090aabf4d826b436
[CMake] Update FindGPRC to use add_llvm_library

add_clang_library is not available in components other than clang and
clang-tool-extras. Trying to use this module elsewhere will cause cmake
error. `add_clang_library` doesn't seem necessary for clangd's GRPC.
Change it to a more generic `add_llvm_library` so it is easier to build
other downstream projects with GRPC that doesn't depend on clang.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D131593
llvm/cmake/modules/FindGRPC.cmake