================ @@ -23,7 +23,9 @@ add_subdirectory(Tooling) add_subdirectory(DirectoryWatcher) add_subdirectory(Index) add_subdirectory(IndexSerialization) -add_subdirectory(StaticAnalyzer) +if(CLANG_ENABLE_STATIC_ANALYZER) ---------------- smeenai wrote:
I agree with Chris in general. This case is a bit different because the static analyzer sources would be included in Clang otherwise instead of being a standalone target you could just not build (roughly analogous to `LLVM_TARGETS_TO_BUILD`), but what are the concrete savings (build time, binary size, etc.) from the option, to weigh against the added build complexity? I see some unguarded uses of the static analyzer libraries, e.g. `clang/tools/clang-check/CMakeLists.txt` unconditionally references `clangStaticAnalyzerFrontend`, so those would need to be adjusted as well if we went this route. It seems like that can get easily broken in the future as well though. https://github.com/llvm/llvm-project/pull/71653 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits