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)
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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits