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

Chris B via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 07:54:55 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)
----------------
llvm-beanz wrote:

This approach slightly bothers me. One of the mistakes I think we (and by we I mean me) have made in the build system is allowing lots of things to be disabled from the configuration.

In general I think it is desirable to build and test code always, but to support modularity in what gets built into the final products.

I realize there is some contention between that approach having fast build and test cycles, but the tradeoff between fast and adequate coverage is not always an easy line to draw.

(cc @petrhosek & @smeenai)

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


More information about the cfe-commits mailing list