[clang] [clang][ssaf] Fix CLANG_PLUGIN_SUPPORT=OFF SSAFExamplePlugin cmake errors (PR #191229)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 09:04:47 PDT 2026
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/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
>From 98f4759889ea145b06f1ad35095141b7b70cb6e6 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Thu, 9 Apr 2026 18:01:26 +0200
Subject: [PATCH] [clang][ssaf] Fix CLANG_PLUGIN_SUPPORT=OFF builds
---
clang/test/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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