[PATCH] D95737: [NFC][Docs] Fix RAVFrontendAction doc's CMakelists.txt for Shared build

Shivam Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 30 07:34:05 PST 2021


xgupta created this revision.
xgupta added reviewers: awarzynski, stephenkelly.
xgupta requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Example tutorial <https://clang.llvm.org/docs/RAVFrontendAction.html> giving undefine reference error while building with ```BUILD_SHARED_LIBS=ON```.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95737

Files:
  clang/docs/RAVFrontendAction.rst


Index: clang/docs/RAVFrontendAction.rst
===================================================================
--- clang/docs/RAVFrontendAction.rst
+++ clang/docs/RAVFrontendAction.rst
@@ -207,7 +207,14 @@
 
     add_clang_executable(find-class-decls FindClassDecls.cpp)
 
-    target_link_libraries(find-class-decls clangTooling)
+    target_link_libraries(find-class-decls 
+      PRIVATE
+      clangAST
+      clangBasic
+      clangFrontend
+      clangSerialization
+      clangTooling
+      )
 
 When running this tool over a small code snippet it will output all
 declarations of a class n::m::C it found:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95737.320300.patch
Type: text/x-patch
Size: 612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210130/04b461c4/attachment.bin>


More information about the cfe-commits mailing list