Revert [test] Fix plugin tests
This reverts r361790 (git commit fe5eaab2b5
)
It's causing buildbot breakage, so reverting while I investigate.
llvm-svn: 361793
This commit is contained in:
parent
cfca5095df
commit
102b4b2486
|
@ -34,5 +34,3 @@ add_clang_library(clangAnalysis
|
|||
clangBasic
|
||||
clangLex
|
||||
)
|
||||
|
||||
add_subdirectory(plugins)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
if(LLVM_ENABLE_PLUGINS)
|
||||
add_subdirectory(SampleAnalyzer)
|
||||
add_subdirectory(CheckerDependencyHandling)
|
||||
add_subdirectory(CheckerOptionHandling)
|
||||
endif()
|
|
@ -1,10 +0,0 @@
|
|||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports)
|
||||
add_llvm_library(SampleAnalyzerPlugin MODULE MainCallChecker.cpp PLUGIN_TOOL clang)
|
||||
|
||||
target_link_libraries(SampleAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
clangStaticAnalyzerFrontend
|
||||
LLVMSupport
|
||||
)
|
|
@ -18,5 +18,7 @@ config.substitutions.append(('%diff_plist',
|
|||
config.substitutions.append(('%diff_sarif',
|
||||
'''diff -U1 -w -I ".*file:.*%basename_t" -I '"version":' -I "2\.0\.0\-csd\.[0-9]*\.beta\."'''))
|
||||
|
||||
config.excludes.add('plugins')
|
||||
|
||||
if not config.root.clang_staticanalyzer:
|
||||
config.unsupported = True
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
add_subdirectory(SampleAnalyzer)
|
||||
add_subdirectory(CheckerDependencyHandling)
|
||||
add_subdirectory(CheckerOptionHandling)
|
||||
|
||||
set(CLANG_ANALYZER_PLUGIN_DEPS
|
||||
SampleAnalyzerPlugin
|
||||
CheckerDependencyHandlingAnalyzerPlugin
|
||||
CheckerOptionHandlingAnalyzerPlugin
|
||||
)
|
||||
|
||||
add_custom_target(clang-analyzer-plugin
|
||||
DEPENDS ${CLANG_ANALYZER_PLUGIN_DEPS})
|
|
@ -1,10 +1,11 @@
|
|||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerDependencyHandlingAnalyzerPlugin.exports)
|
||||
add_llvm_library(CheckerDependencyHandlingAnalyzerPlugin MODULE CheckerDependencyHandling.cpp PLUGIN_TOOL clang)
|
||||
|
||||
target_link_libraries(CheckerDependencyHandlingAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
clangStaticAnalyzerFrontend
|
||||
LLVMSupport
|
||||
)
|
||||
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
|
||||
target_link_libraries(CheckerDependencyHandlingAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
LLVMSupport
|
||||
)
|
||||
endif()
|
|
@ -1,10 +1,11 @@
|
|||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerOptionHandlingAnalyzerPlugin.exports)
|
||||
add_llvm_library(CheckerOptionHandlingAnalyzerPlugin MODULE CheckerOptionHandling.cpp PLUGIN_TOOL clang)
|
||||
|
||||
target_link_libraries(CheckerOptionHandlingAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
clangStaticAnalyzerFrontend
|
||||
LLVMSupport
|
||||
)
|
||||
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
|
||||
target_link_libraries(CheckerOptionHandlingAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
LLVMSupport
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,11 @@
|
|||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports)
|
||||
add_llvm_library(SampleAnalyzerPlugin MODULE MainCallChecker.cpp PLUGIN_TOOL clang)
|
||||
|
||||
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
|
||||
target_link_libraries(SampleAnalyzerPlugin PRIVATE
|
||||
clangAnalysis
|
||||
clangAST
|
||||
clangStaticAnalyzerCore
|
||||
LLVMSupport
|
||||
)
|
||||
endif()
|
|
@ -126,13 +126,27 @@ if( NOT CLANG_BUILT_STANDALONE )
|
|||
endif()
|
||||
|
||||
if (CLANG_ENABLE_STATIC_ANALYZER)
|
||||
if (LLVM_ENABLE_PLUGINS)
|
||||
set(CLANG_ANALYZER_PLUGIN_DEPS
|
||||
SampleAnalyzerPlugin
|
||||
CheckerDependencyHandlingAnalyzerPlugin
|
||||
CheckerOptionHandlingAnalyzerPlugin
|
||||
)
|
||||
add_subdirectory(Analysis/plugins)
|
||||
list(APPEND CLANG_TEST_DEPS clang-analyzer-plugin)
|
||||
|
||||
# check-all would launch those tests via check-clang.
|
||||
set(EXCLUDE_FROM_ALL ON)
|
||||
|
||||
add_lit_testsuite(check-clang-analyzer "Running the Clang analyzer tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Analysis
|
||||
PARAMS ${ANALYZER_TEST_PARAMS}
|
||||
DEPENDS ${CLANG_TEST_DEPS})
|
||||
set_target_properties(check-clang-analyzer PROPERTIES FOLDER "Clang tests")
|
||||
|
||||
if (LLVM_WITH_Z3)
|
||||
add_lit_testsuite(check-clang-analyzer-z3 "Running the Clang analyzer tests, using Z3 as a solver"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Analysis
|
||||
PARAMS ${ANALYZER_TEST_PARAMS_Z3}
|
||||
DEPENDS ${CLANG_TEST_DEPS})
|
||||
set_target_properties(check-clang-analyzer-z3 PROPERTIES FOLDER "Clang tests")
|
||||
endif()
|
||||
|
||||
set(EXCLUDE_FROM_ALL OFF)
|
||||
endif()
|
||||
|
||||
add_custom_target(clang-test-depends DEPENDS ${CLANG_TEST_DEPS})
|
||||
|
|
|
@ -672,17 +672,6 @@ set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
|
|||
message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
|
||||
message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
|
||||
|
||||
if(WIN32 OR CYGWIN)
|
||||
if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
|
||||
set(LLVM_ENABLE_PLUGINS_default ON)
|
||||
else()
|
||||
set(LLVM_ENABLE_PLUGINS_default OFF)
|
||||
endif()
|
||||
else()
|
||||
set(LLVM_ENABLE_PLUGINS_default ON)
|
||||
endif()
|
||||
option(LLVM_ENABLE_PLUGINS "Enable plugin support" ${LLVM_ENABLE_PLUGINS_default})
|
||||
|
||||
include(HandleLLVMOptions)
|
||||
|
||||
# Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
|
||||
|
|
|
@ -912,6 +912,14 @@ if(LLVM_LINK_LLVM_DYLIB AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
|
|||
message(FATAL_ERROR "LLVM_LINK_LLVM_DYLIB not compatible with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS")
|
||||
endif()
|
||||
|
||||
# Plugin support
|
||||
# FIXME: Make this configurable.
|
||||
if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
|
||||
set(LLVM_ENABLE_PLUGINS ON)
|
||||
else()
|
||||
set(LLVM_ENABLE_PLUGINS OFF)
|
||||
endif()
|
||||
|
||||
# By default we should enable LLVM_ENABLE_IDE only for multi-configuration
|
||||
# generators. This option disables optional build system features that make IDEs
|
||||
# less usable.
|
||||
|
|
Loading…
Reference in New Issue