[clang] [Clang] Don't build static analyzer if disabled (PR #212024)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 25 06:59:18 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Alexis Engelke (aengelke)
<details>
<summary>Changes</summary>
Even if the static analyzer is disabled, it still gets built into the
dylib. Unit tests and tools already get disables, so also stop building
the library. This reduces the time needed to build a dylib clang by
8-9%.
---
Full diff: https://github.com/llvm/llvm-project/pull/212024.diff
1 Files Affected:
- (modified) clang/lib/CMakeLists.txt (+3-1)
``````````diff
diff --git a/clang/lib/CMakeLists.txt b/clang/lib/CMakeLists.txt
index dee31cb3f166e..49e2c4c77a870 100644
--- a/clang/lib/CMakeLists.txt
+++ b/clang/lib/CMakeLists.txt
@@ -24,7 +24,9 @@ add_subdirectory(Index)
add_subdirectory(IndexSerialization)
add_subdirectory(InstallAPI)
add_subdirectory(ScalableStaticAnalysis)
-add_subdirectory(StaticAnalyzer)
+if(CLANG_ENABLE_STATIC_ANALYZER)
+ add_subdirectory(StaticAnalyzer)
+endif()
add_subdirectory(Format)
if(CLANG_INCLUDE_TESTS)
add_subdirectory(Testing)
``````````
</details>
https://github.com/llvm/llvm-project/pull/212024
More information about the cfe-commits
mailing list