llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.38k stars 12.15k forks source link

Tools do not explain how to link clang lib files #59346

Open miss-programgamer opened 1 year ago

miss-programgamer commented 1 year ago

The various tools that this page recommends we use as examples on how to link against the clang lib files do not actually do so. For instance, in clang-check, neither add_clang_tool nor clang_target_link_libraries are explained, and nothing indicates which cmake file need to be included to make those functions available.

When I try to follow the example linked above, I get a linker error telling me that symbols relating to clang tooling (such as the CommonOptionsParser constructor) are unresolved, yet I can't figure out how to link against the various clang lib files that the project needs.

I realize this might not be the best place to ask this, but I'm not sure where else to go considering how massive of a project LLVM is.

miss-programgamer commented 1 year ago

In the meantime I ended up manually linking all of the clang lib files I compiled by their full path since I didn't know which ones were necessary.

Please do not mark this as resolved, this is not a good solution.