MaskRay added a comment. `llvm/cmake/modules/HandleLLVMOptions.cmake` passes `-Wl,-z,defs`. `-DBUILD_SHARED_LIBS=on` builds get checking from the linker option (https://maskray.me/blog/2021-06-13-dependency-related-linker-options#z-defs). This is similar Bazel's layering_check.
For a dependency, say, `clangTooling`, if a source file within the `clangd` target (executable) uses (directly or transitively) clangTooling, the dependency should be kept, otherwise it should be removed. If the source files are completely IWYU clean, it should be straightforward to tell whether a dependency can be removed by inspecting the `#include` lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155540/new/ https://reviews.llvm.org/D155540 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits