mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 07:36:50 +00:00

If a add_clang_library call doesn't specify building as static or shared
library they are implicitly added to the list static libraries that is
linked in to clang-cpp shared library here.
315ba77406/clang/cmake/modules/AddClang.cmake (L107)
Because the clang-tools-extra libraries targets were declared after
clang-cpp they by luck never got linked to clang-cpp.
This change is required for clang symbol visibility macros on windows to
work correctly for clang tools since we need to distinguish if a target
being built will be importing or exporting clang symbols from the
clang-cpp DLL.
27 lines
729 B
CMake
27 lines
729 B
CMake
set(CLANGD_XPC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
set(CLANGD_XPC_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
|
include(CreateClangdXPCFramework)
|
|
|
|
add_subdirectory(framework)
|
|
add_subdirectory(test-client)
|
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
Support
|
|
)
|
|
|
|
# Needed by LLVM's CMake checks because this file defines multiple targets.
|
|
set(LLVM_OPTIONAL_SOURCES Conversion.cpp XPCTransport.cpp)
|
|
|
|
add_clang_library(clangdXpcJsonConversions STATIC
|
|
Conversion.cpp
|
|
LINK_LIBS clangDaemon clangdSupport
|
|
)
|
|
|
|
add_clang_library(clangdXpcTransport STATIC
|
|
XPCTransport.cpp
|
|
LINK_LIBS clangDaemon clangdSupport clangdXpcJsonConversions
|
|
DEPENDS ClangDriverOptions
|
|
)
|