[PATCH] D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF
Dimitry Andric via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 4 12:48:41 PDT 2019
dim created this revision.
dim added reviewers: hintonda, dcoughlin, NoQ.
Herald added subscribers: dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware, mgorny.
Herald added a project: clang.
Attempting to build clang with CLANG_ENABLE_STATIC_ANALYZER=OFF fails
after rC362328 <https://reviews.llvm.org/rC362328>, because the new plugins under lib/Analysis/plugins are
dependent on the static analyzer libraries.
Add checks to disable building these if CLANG_ENABLE_STATIC_ANALYZER is
OFF.
Repository:
rC Clang
https://reviews.llvm.org/D62873
Files:
lib/Analysis/plugins/CMakeLists.txt
test/CMakeLists.txt
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -119,14 +119,12 @@
endif()
endif()
-if (CLANG_ENABLE_STATIC_ANALYZER)
- if (LLVM_ENABLE_PLUGINS)
- list(APPEND CLANG_TEST_DEPS
- SampleAnalyzerPlugin
- CheckerDependencyHandlingAnalyzerPlugin
- CheckerOptionHandlingAnalyzerPlugin
- )
- endif()
+if(LLVM_ENABLE_PLUGINS AND CLANG_ENABLE_STATIC_ANALYZER)
+ list(APPEND CLANG_TEST_DEPS
+ SampleAnalyzerPlugin
+ CheckerDependencyHandlingAnalyzerPlugin
+ CheckerOptionHandlingAnalyzerPlugin
+ )
endif()
add_custom_target(clang-test-depends DEPENDS ${CLANG_TEST_DEPS})
Index: lib/Analysis/plugins/CMakeLists.txt
===================================================================
--- lib/Analysis/plugins/CMakeLists.txt
+++ lib/Analysis/plugins/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(LLVM_ENABLE_PLUGINS)
+if(LLVM_ENABLE_PLUGINS AND CLANG_ENABLE_STATIC_ANALYZER)
add_subdirectory(SampleAnalyzer)
add_subdirectory(CheckerDependencyHandling)
add_subdirectory(CheckerOptionHandling)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62873.203001.patch
Type: text/x-patch
Size: 1122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190604/5e24c479/attachment.bin>
More information about the cfe-commits
mailing list