mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 20:20:54 +00:00
[clangd] Fix shared-lib builds
Differential Revision: https://reviews.llvm.org/D91859
This commit is contained in:
parent
49e463ff80
commit
f726101b62
@ -168,17 +168,18 @@ if ( CLANGD_BUILD_XPC )
|
||||
add_subdirectory(xpc)
|
||||
endif ()
|
||||
|
||||
if (CLANGD_ENABLE_REMOTE)
|
||||
include(FindGRPC)
|
||||
endif()
|
||||
|
||||
if(CLANG_INCLUDE_TESTS)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(unittests)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(unittests)
|
||||
endif()
|
||||
|
||||
# FIXME(kirillbobyrev): Document this in the LLVM docs once remote index is stable.
|
||||
option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable remote index support for Clangd" OFF)
|
||||
set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual installation.")
|
||||
|
||||
if (CLANGD_ENABLE_REMOTE)
|
||||
include(FindGRPC)
|
||||
endif()
|
||||
add_subdirectory(index/remote)
|
||||
add_subdirectory(index/dex/dexp)
|
||||
|
@ -3,6 +3,12 @@ if (CLANGD_ENABLE_REMOTE)
|
||||
generate_protos(RemoteIndexServiceProto "Service.proto"
|
||||
DEPENDS "Index.proto"
|
||||
GRPC)
|
||||
# FIXME: Move this into generate_protos. Currently we only mention proto
|
||||
# filename as a dependency, but linking requires target name.
|
||||
target_link_libraries(RemoteIndexServiceProto
|
||||
PRIVATE
|
||||
RemoteIndexProto
|
||||
)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
|
||||
@ -18,8 +24,8 @@ if (CLANGD_ENABLE_REMOTE)
|
||||
RemoteIndexProto
|
||||
RemoteIndexServiceProto
|
||||
clangdRemoteMarshalling
|
||||
protobuf
|
||||
grpc++
|
||||
clangBasic
|
||||
clangDaemon
|
||||
clangdSupport
|
||||
|
||||
DEPENDS
|
||||
|
@ -4,7 +4,6 @@ add_clang_library(clangdRemoteMarshalling
|
||||
LINK_LIBS
|
||||
RemoteIndexProto
|
||||
|
||||
protobuf
|
||||
clangDaemon
|
||||
clangdSupport
|
||||
|
||||
|
@ -17,6 +17,4 @@ target_link_libraries(clangd-index-server
|
||||
RemoteIndexProto
|
||||
RemoteIndexServiceProto
|
||||
clangdRemoteMarshalling
|
||||
|
||||
grpc++
|
||||
)
|
||||
|
@ -146,7 +146,8 @@ target_link_libraries(ClangdTests
|
||||
if (CLANGD_ENABLE_REMOTE)
|
||||
target_link_libraries(ClangdTests
|
||||
PRIVATE
|
||||
clangdRemoteMarshalling)
|
||||
clangdRemoteMarshalling
|
||||
RemoteIndexProto)
|
||||
endif()
|
||||
|
||||
if (CLANGD_BUILD_XPC)
|
||||
|
@ -112,7 +112,7 @@ function(generate_protos LibraryName ProtoFile)
|
||||
|
||||
add_clang_library(${LibraryName} ${GeneratedProtoSource}
|
||||
PARTIAL_SOURCES_INTENDED
|
||||
LINK_LIBS grpc++ protobuf)
|
||||
LINK_LIBS PUBLIC grpc++ protobuf)
|
||||
|
||||
# Ensure dependency headers are generated before dependent protos are built.
|
||||
# DEPENDS arg is a list of "Foo.proto". While they're logically relative to
|
||||
|
Loading…
Reference in New Issue
Block a user