llvm.org GIT mirror llvm / 6964f65
[test] Fix plugin tests Recommit of r361790 that was temporarily reverted in r361793 due to bot breakage. Summary: The following changes were required to fix these tests: 1) Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior. 2) Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate `check-` targets, which don't make sense for the plugins because they aren't tests and don't have `RUN` statements. Here's a list of the `clang-check-anlysis*` targets with this change: ``` $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3 ``` 3) Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set. Reviewed By: NoQ Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62445 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362328 91177308-0d34-0410-b5e6-96231b3b80d8 Don Hinton a month ago
2 changed file(s) with 11 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
621621 message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
622622 message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
623623
624 if(WIN32 OR CYGWIN)
625 if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
626 set(LLVM_ENABLE_PLUGINS_default ON)
627 else()
628 set(LLVM_ENABLE_PLUGINS_default OFF)
629 endif()
630 else()
631 set(LLVM_ENABLE_PLUGINS_default ON)
632 endif()
633 option(LLVM_ENABLE_PLUGINS "Enable plugin support" ${LLVM_ENABLE_PLUGINS_default})
634
624635 include(HandleLLVMOptions)
625636
626637 # Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
911911 message(FATAL_ERROR "LLVM_LINK_LLVM_DYLIB not compatible with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS")
912912 endif()
913913
914 # Plugin support
915 # FIXME: Make this configurable.
916 if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
917 set(LLVM_ENABLE_PLUGINS ON)
918 else()
919 set(LLVM_ENABLE_PLUGINS OFF)
920 endif()
921
922914 # By default we should enable LLVM_ENABLE_IDE only for multi-configuration
923915 # generators. This option disables optional build system features that make IDEs
924916 # less usable.