[clang] dab3c6d - [Clang] Change Attribute plugin to link clang-cpp like other examples (#109319)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 22:06:03 PDT 2024
Author: Thomas Fransham
Date: 2024-09-20T08:05:59+03:00
New Revision: dab3c6d39458fcc0607c678263132d7ca184cddd
URL: https://github.com/llvm/llvm-project/commit/dab3c6d39458fcc0607c678263132d7ca184cddd
DIFF: https://github.com/llvm/llvm-project/commit/dab3c6d39458fcc0607c678263132d7ca184cddd.diff
LOG: [Clang] Change Attribute plugin to link clang-cpp like other examples (#109319)
Change the Attribute example plugin to use clang_target_link_libraries
instead of target_link_libraries so libclang-cpp is linked when the
CLANG_LINK_CLANG_DYLIB CMake option is used.
This change will allow building the plugin on windows when building llvm
and clang as a shared library with explicit visibility macros enabled.
Added:
Modified:
clang/examples/Attribute/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/examples/Attribute/CMakeLists.txt b/clang/examples/Attribute/CMakeLists.txt
index 770fa28364b770..0200063d86b0ca 100644
--- a/clang/examples/Attribute/CMakeLists.txt
+++ b/clang/examples/Attribute/CMakeLists.txt
@@ -1,11 +1,13 @@
add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
if(WIN32 OR CYGWIN)
- target_link_libraries(Attribute PRIVATE
+ set(LLVM_LINK_COMPONENTS
+ Support
+ )
+ clang_target_link_libraries(Attribute PRIVATE
clangAST
clangBasic
clangFrontend
clangLex
- LLVMSupport
)
endif()
More information about the cfe-commits
mailing list