aboutsummaryrefslogtreecommitdiff
path: root/clang/examples
diff options
context:
space:
mode:
authorJameson Nash <vtjnash@gmail.com>2022-02-11 16:42:37 -0500
committerJameson Nash <vtjnash@gmail.com>2022-02-16 11:59:09 -0500
commit9d59cfc67eadbe4b4088d70f8bbc61c96568d2f1 (patch)
tree93f18cb69454cbd033233fb32650c6744fdf5ae8 /clang/examples
parentfbf7bbcb839929ff4eed89921191ed51a2a99777 (diff)
downloadllvm-9d59cfc67eadbe4b4088d70f8bbc61c96568d2f1.zip
llvm-9d59cfc67eadbe4b4088d70f8bbc61c96568d2f1.tar.gz
llvm-9d59cfc67eadbe4b4088d70f8bbc61c96568d2f1.tar.bz2
clang-analyzer plugins require LLVM_ENABLE_PLUGINS also
The clang-analyzer plugins are not linked to a particular tool, so they can only be compiled if plugins are broadly supported. We could opt instead to decide whether to link them to specifically against clang or with undefined symbols, depending on the value of LLVM_ENABLE_PLUGINS, but we do not currently expect there to be a use case for that rather niche configuration. Differential Revision: https://reviews.llvm.org/D119591
Diffstat (limited to 'clang/examples')
-rw-r--r--clang/examples/AnnotateFunctions/CMakeLists.txt2
-rw-r--r--clang/examples/Attribute/CMakeLists.txt2
-rw-r--r--clang/examples/CMakeLists.txt12
-rw-r--r--clang/examples/CallSuperAttribute/CMakeLists.txt2
-rw-r--r--clang/examples/PluginsOrder/CMakeLists.txt2
-rw-r--r--clang/examples/PrintFunctionNames/CMakeLists.txt2
6 files changed, 12 insertions, 10 deletions
diff --git a/clang/examples/AnnotateFunctions/CMakeLists.txt b/clang/examples/AnnotateFunctions/CMakeLists.txt
index e6541f7..827ff79 100644
--- a/clang/examples/AnnotateFunctions/CMakeLists.txt
+++ b/clang/examples/AnnotateFunctions/CMakeLists.txt
@@ -1,6 +1,6 @@
add_llvm_library(AnnotateFunctions MODULE AnnotateFunctions.cpp PLUGIN_TOOL clang)
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
set(LLVM_LINK_COMPONENTS
Support
)
diff --git a/clang/examples/Attribute/CMakeLists.txt b/clang/examples/Attribute/CMakeLists.txt
index 5392ac0..770fa28 100644
--- a/clang/examples/Attribute/CMakeLists.txt
+++ b/clang/examples/Attribute/CMakeLists.txt
@@ -1,6 +1,6 @@
add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
target_link_libraries(Attribute PRIVATE
clangAST
clangBasic
diff --git a/clang/examples/CMakeLists.txt b/clang/examples/CMakeLists.txt
index 4a67793..8be327b 100644
--- a/clang/examples/CMakeLists.txt
+++ b/clang/examples/CMakeLists.txt
@@ -3,8 +3,10 @@ if(NOT CLANG_BUILD_EXAMPLES)
set(EXCLUDE_FROM_ALL ON)
endif()
-add_subdirectory(PrintFunctionNames)
-add_subdirectory(AnnotateFunctions)
-add_subdirectory(Attribute)
-add_subdirectory(CallSuperAttribute)
-add_subdirectory(PluginsOrder)
+if(CLANG_PLUGIN_SUPPORT)
+ add_subdirectory(PrintFunctionNames)
+ add_subdirectory(AnnotateFunctions)
+ add_subdirectory(Attribute)
+ add_subdirectory(CallSuperAttribute)
+ add_subdirectory(PluginsOrder)
+endif()
diff --git a/clang/examples/CallSuperAttribute/CMakeLists.txt b/clang/examples/CallSuperAttribute/CMakeLists.txt
index f4284ad..dc83232 100644
--- a/clang/examples/CallSuperAttribute/CMakeLists.txt
+++ b/clang/examples/CallSuperAttribute/CMakeLists.txt
@@ -1,6 +1,6 @@
add_llvm_library(CallSuperAttr MODULE CallSuperAttrInfo.cpp PLUGIN_TOOL clang)
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
set(LLVM_LINK_COMPONENTS
Support
)
diff --git a/clang/examples/PluginsOrder/CMakeLists.txt b/clang/examples/PluginsOrder/CMakeLists.txt
index 612587a..c22b008 100644
--- a/clang/examples/PluginsOrder/CMakeLists.txt
+++ b/clang/examples/PluginsOrder/CMakeLists.txt
@@ -1,6 +1,6 @@
add_llvm_library(PluginsOrder MODULE PluginsOrder.cpp PLUGIN_TOOL clang)
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
set(LLVM_LINK_COMPONENTS
Support
)
diff --git a/clang/examples/PrintFunctionNames/CMakeLists.txt b/clang/examples/PrintFunctionNames/CMakeLists.txt
index 67f1b16..28da363 100644
--- a/clang/examples/PrintFunctionNames/CMakeLists.txt
+++ b/clang/examples/PrintFunctionNames/CMakeLists.txt
@@ -11,7 +11,7 @@ endif()
add_llvm_library(PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang)
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
set(LLVM_LINK_COMPONENTS
Support
)