[llvm] 9698deb - [clangd] Clarify comments regarding gRPC linking
Kirill Bobyrev via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 02:03:04 PDT 2020
Author: Kirill Bobyrev
Date: 2020-08-14T11:02:03+02:00
New Revision: 9698deb2570231aee95e183a23c67e49da176c0b
URL: https://github.com/llvm/llvm-project/commit/9698deb2570231aee95e183a23c67e49da176c0b
DIFF: https://github.com/llvm/llvm-project/commit/9698deb2570231aee95e183a23c67e49da176c0b.diff
LOG: [clangd] Clarify comments regarding gRPC linking
Added:
Modified:
llvm/cmake/modules/FindGRPC.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/FindGRPC.cmake b/llvm/cmake/modules/FindGRPC.cmake
index 20c1c0f2cb58..b7fafb2cce6e 100644
--- a/llvm/cmake/modules/FindGRPC.cmake
+++ b/llvm/cmake/modules/FindGRPC.cmake
@@ -3,7 +3,10 @@
if (GRPC_INSTALL_PATH)
# This setup requires gRPC to be built from sources using CMake and installed
# to ${GRPC_INSTALL_PATH} via -DCMAKE_INSTALL_PREFIX=${GRPC_INSTALL_PATH}.
- # gRPC and Protobuf will be linked statically.
+ # Libraries will be linked according to gRPC build policy which generates
+ # static libraries when BUILD_SHARED_LIBS is Off and dynamic libraries when
+ # it's On (NOTE: This is a variable passed to gRPC CMake build invocation,
+ # LLVM's BUILD_SHARED_LIBS has no effect).
set(protobuf_MODULE_COMPATIBLE TRUE)
find_package(Protobuf CONFIG REQUIRED HINTS ${GRPC_INSTALL_PATH})
message(STATUS "Using protobuf ${protobuf_VERSION}")
@@ -27,7 +30,7 @@ else()
# usually installed, the CMake files telling us *which* static libraries to
# link are not.
if (NOT BUILD_SHARED_LIBS)
- message(NOTICE "gRPC and Protobuf will be linked dynamically. If you want static linking, build gRPC from sources.")
+ message(NOTICE "gRPC and Protobuf will be linked dynamically. If you want static linking, build gRPC from sources with -DBUILD_SHARED_LIBS=Off.")
endif()
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)
find_program(PROTOC protoc)
More information about the llvm-commits
mailing list