https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/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. >From 287ce6d6f54283622c9c388d889dde7a455e65c5 Mon Sep 17 00:00:00 2001 From: Thomas Fransham <tfrans...@gmail.com> Date: Thu, 19 Sep 2024 19:41:44 +0100 Subject: [PATCH] [Clang] Change Attribute plugin to link clang-cpp like other examples Switched clang_target_link_libraries instead of target_link_libraries so libclang-cpp is linked when the CLANG_LINK_CLANG_DYLIB CMake option is used --- clang/examples/Attribute/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits