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

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 13 05:37:10 PST 2021


awarzynski added a comment.

Hi @xgupta , thank you for working on this!

It's quite easy to miss dependencies when building with `BUILD_SHARED_LIBS=Off` (i.e. with the default setting - static libs). IIUC, that's what happened here. This example clearly requires the following:

- `ASTConsumer` implemented in `clangAST`
- `FullSourceLoc` implemented in `clangBasic`
- `ASTFrontendAction` implemented in `clangFrontend`
- `PCHContainerOperations` (required for the invocation of `runToolOnCode`)  implemented in `clangSerialization`

All the above were missing and your patch fixes that, thank you a ton! I think that this is also missing (implements `llvm::outs()`):

  set(LLVM_LINK_COMPONENTS
    Support
    )

I tested on Darwin with `BUILD_SHARED_LIBS=On` and I'm getting build errors without it:

  Undefined symbols for architecture x86_64:
    "llvm::outs()", referenced from:
        FindNamedClassVisitor::VisitCXXRecordDecl(clang::CXXRecordDecl*) in FindClassDecls.cpp.o

PS Apologies for taking so much time to review this!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95737/new/

https://reviews.llvm.org/D95737



More information about the cfe-commits mailing list