Skip to content

Commit dab3c6d

Browse files
authoredSep 20, 2024
[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.
1 parent 528bcf3 commit dab3c6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 
+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
22

33
if(WIN32 OR CYGWIN)
4-
target_link_libraries(Attribute PRIVATE
4+
set(LLVM_LINK_COMPONENTS
5+
Support
6+
)
7+
clang_target_link_libraries(Attribute PRIVATE
58
clangAST
69
clangBasic
710
clangFrontend
811
clangLex
9-
LLVMSupport
1012
)
1113
endif()

0 commit comments

Comments
 (0)
Please sign in to comment.