[clang-tools-extra] 58d0ef2 - [clangd] Fix remote index build failures due to lack of proto dependency
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 06:14:59 PDT 2020
Author: Kirill Bobyrev
Date: 2020-10-26T14:14:47+01:00
New Revision: 58d0ef2d0466a893ab400f6a9829057b9d851038
URL: https://github.com/llvm/llvm-project/commit/58d0ef2d0466a893ab400f6a9829057b9d851038
DIFF: https://github.com/llvm/llvm-project/commit/58d0ef2d0466a893ab400f6a9829057b9d851038.diff
LOG: [clangd] Fix remote index build failures due to lack of proto dependency
Previous attempt (15f6bad6d74a993e366c8fc93a9c91f213ac6bc3) introduced
add_dependencies but unfortunately it does not actually add a dependency
between RemoteIndexProto and RemoteIndexServiceProto. This is likely due
to some requirements of it that clang_add_library violates.
As a workaround, we will link RemoteIndexProto library to
RemoteIndexServiceProto which is logical because the library can not be
without linking to RemoteIndexProto anyway.
Added:
Modified:
clang-tools-extra/clangd/index/remote/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/remote/CMakeLists.txt b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
index e3782d9701c7..5a9f49a41d1f 100644
--- a/clang-tools-extra/clangd/index/remote/CMakeLists.txt
+++ b/clang-tools-extra/clangd/index/remote/CMakeLists.txt
@@ -1,7 +1,11 @@
if (CLANGD_ENABLE_REMOTE)
generate_protos(RemoteIndexServiceProto "Service.proto" GRPC)
generate_protos(RemoteIndexProto "Index.proto")
- add_dependencies(RemoteIndexServiceProto RemoteIndexProto)
+ target_link_libraries(RemoteIndexServiceProto
+
+ PRIVATE
+ RemoteIndexProto
+ )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../)
More information about the cfe-commits
mailing list