[clang] [clang] Only build static analyzer sources if requested (PR #71653)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 10:23:34 PST 2023


================
@@ -23,7 +23,9 @@ add_subdirectory(Tooling)
 add_subdirectory(DirectoryWatcher)
 add_subdirectory(Index)
 add_subdirectory(IndexSerialization)
-add_subdirectory(StaticAnalyzer)
+if(CLANG_ENABLE_STATIC_ANALYZER)
----------------
petrhosek wrote:

I agree with @llvm-beanz but I'd propose going even further and removing this option altogether. Rather than having separate `CLANG_ENABLE_<TOOL>` options for each tool which doesn't scale very well, we should encourage developers to use `LLVM_DISTRIBUTION_COMPONENTS` to control which tools to build.

https://github.com/llvm/llvm-project/pull/71653


More information about the cfe-commits mailing list