From: John Brawn Date: Fri, 8 Jul 2016 16:20:57 +0000 (+0000) Subject: Explicitly export symbols from the sample analyzer plugin X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83cd1c59c4a65affb14cbe933c1dda680cfa830d;p=clang Explicitly export symbols from the sample analyzer plugin This is done so that it will work when built using MSVC if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON. Differential Revision: http://reviews.llvm.org/D21971 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274871 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/analyzer-plugin/CMakeLists.txt b/examples/analyzer-plugin/CMakeLists.txt index dcbe5c4e0e..0d5b2754ca 100644 --- a/examples/analyzer-plugin/CMakeLists.txt +++ b/examples/analyzer-plugin/CMakeLists.txt @@ -1,4 +1,5 @@ -add_llvm_loadable_module(SampleAnalyzerPlugin MainCallChecker.cpp) +set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports) +add_llvm_loadable_module(SampleAnalyzerPlugin MainCallChecker.cpp PLUGIN_TOOL clang) if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) target_link_libraries(SampleAnalyzerPlugin PRIVATE diff --git a/examples/analyzer-plugin/SampleAnalyzerPlugin.exports b/examples/analyzer-plugin/SampleAnalyzerPlugin.exports new file mode 100644 index 0000000000..8d9ff882cf --- /dev/null +++ b/examples/analyzer-plugin/SampleAnalyzerPlugin.exports @@ -0,0 +1,2 @@ +clang_registerCheckers +clang_analyzerAPIVersionString