Author: Alexis Engelke
Date: 2026-07-25T21:07:27+02:00
New Revision: 890d1331a35c6961191db07447df2623619afb7e

URL: 
https://github.com/llvm/llvm-project/commit/890d1331a35c6961191db07447df2623619afb7e
DIFF: 
https://github.com/llvm/llvm-project/commit/890d1331a35c6961191db07447df2623619afb7e.diff

LOG: [Clang] Don't build static analyzer if disabled (#212024)

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%.

Added: 
    

Modified: 
    clang/lib/CMakeLists.txt

Removed: 
    


################################################################################
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)


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to