[PATCH] D111100: enable plugins for clang-tidy
Jameson Nash via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 7 14:37:07 PST 2022
vtjnash added a comment.
Ah, this looks annoying: there are apparently two flags, CLANG_PLUGIN_SUPPORT and LLVM_ENABLE_PLUGINS, but the existing build for clang uses CLANG_PLUGIN_SUPPORT to turn off the build support and LLVM_ENABLE_PLUGINS to turn off the tests (you might not have noticed this existing issue since you turned off CLANG_ENABLE_STATIC_ANALYZER support, and CLANG_BUILD_EXAMPLES is off by default, which looks like it would disable all of the existing tests for this functionality). This might fix this particular test?
diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt
index 9321457ae1a3..c98ec90a179b 100644
--- a/clang-tools-extra/test/CMakeLists.txt
+++ b/clang-tools-extra/test/CMakeLists.txt
@@ -17,7 +17,7 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUN
llvm_canonicalize_cmake_booleans(
CLANG_TIDY_ENABLE_STATIC_ANALYZER
- LLVM_ENABLE_PLUGINS
+ CLANG_PLUGIN_SUPPORT
LLVM_INSTALL_TOOLCHAIN_ONLY
)
diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in
index e7db0e2ef2cb..d30e6664816b 100644
--- a/clang-tools-extra/test/lit.site.cfg.py.in
+++ b/clang-tools-extra/test/lit.site.cfg.py.in
@@ -12,7 +12,7 @@ config.clang_libs_dir = "@SHLIBDIR@"
config.python_executable = "@Python3_EXECUTABLE@"
config.target_triple = "@TARGET_TRIPLE@"
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
-config.has_plugins = @LLVM_ENABLE_PLUGINS@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
+config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
but it means there are a few other places that need to be changed also to make your configuration work fully.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111100/new/
https://reviews.llvm.org/D111100
More information about the cfe-commits
mailing list