[clang] 20b6ec6 - [clang][ssaf] Fix CLANG_PLUGIN_SUPPORT=OFF SSAFExamplePlugin cmake errors (#191229)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 09:28:31 PDT 2026


Author: Hans Wennborg
Date: 2026-04-09T16:28:25Z
New Revision: 20b6ec66967ac2a8f932863c1abf251e5b17a843

URL: https://github.com/llvm/llvm-project/commit/20b6ec66967ac2a8f932863c1abf251e5b17a843
DIFF: https://github.com/llvm/llvm-project/commit/20b6ec66967ac2a8f932863c1abf251e5b17a843.diff

LOG: [clang][ssaf] Fix CLANG_PLUGIN_SUPPORT=OFF SSAFExamplePlugin cmake errors (#191229)

Such builds would fail with:

```
...
CMake Error at cmake/modules/AddLLVM.cmake:2245 (add_dependencies):
  The dependency target "SSAFExamplePlugin" of target
  "check-clang-utils-update_cc_test_checks" does not exist.
...
```

This fixes it by using the same condition for the test dependency as is
used for deciding to build the plugin in
clang/lib/ScalableStaticAnalysisFramework/Plugins/CMakeLists.txt

Added: 
    

Modified: 
    clang/test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index 0f046b24c2747..9bd21c013b092 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -207,7 +207,7 @@ if(CLANG_ENABLE_STATIC_ANALYZER)
   endif()
 endif()
 
-if(LLVM_ENABLE_PLUGINS)
+if(CLANG_PLUGIN_SUPPORT AND LLVM_ENABLE_PLUGINS)
   list(APPEND CLANG_TEST_DEPS
     SSAFExamplePlugin
     )


        


More information about the cfe-commits mailing list