[PATCH] D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 17:10:58 PDT 2019


hintonda added inline comments.


================
Comment at: lib/Analysis/plugins/CMakeLists.txt:1
-if(LLVM_ENABLE_PLUGINS)
+if(LLVM_ENABLE_PLUGINS AND CLANG_ENABLE_STATIC_ANALYZER)
   add_subdirectory(SampleAnalyzer)
----------------
Szelethus wrote:
> Is this file a thing? `lib/Analysis/plugins/CMakeLists.txt`? I can't seem to find it anywhere.
commit a33eaad00cca99ca0b5d2b0cc6dec33be6d7ee7f (origin/master, origin/HEAD, master)
Author: Don Hinton <hintonda at gmail.com>
Date:   Tue Jun 4 22:07:40 2019 +0000

    [Analysis] Only build Analysis plugins when CLANG_ENABLE_STATIC_ANALYZER is enabled.

    Fixes bug introduced in r362328.

    Thanks to Nathan Chancellor for reporting this!

    llvm-svn: 362555

$ git diff  06c801e153347d24ec7ce93f6ffbbc58b64a89ba a33eaad00cca99ca0b5d2b0cc6dec33be6d7ee7f
diff --git a/clang/lib/Analysis/plugins/CMakeLists.txt b/clang/lib/Analysis/plugins/CMakeLists.txt
index f7dbc936952..bd7314a871f 100644
--- a/clang/lib/Analysis/plugins/CMakeLists.txt
+++ b/clang/lib/Analysis/plugins/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(LLVM_ENABLE_PLUGINS)
+if(CLANG_ENABLE_STATIC_ANALYZER AND LLVM_ENABLE_PLUGINS)
   add_subdirectory(SampleAnalyzer)
   add_subdirectory(CheckerDependencyHandling)
   add_subdirectory(CheckerOptionHandling)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62873/new/

https://reviews.llvm.org/D62873





More information about the cfe-commits mailing list