]> granicus.if.org Git - clang/commitdiff
Explicitly export symbols from the sample analyzer plugin
authorJohn Brawn <john.brawn@arm.com>
Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)
committerJohn Brawn <john.brawn@arm.com>
Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)
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

examples/analyzer-plugin/CMakeLists.txt
examples/analyzer-plugin/SampleAnalyzerPlugin.exports [new file with mode: 0644]

index dcbe5c4e0e90e0c00c9c195da13e6d389188ef64..0d5b2754cafec4c664175fae58cee1929d4b88f1 100644 (file)
@@ -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 (file)
index 0000000..8d9ff88
--- /dev/null
@@ -0,0 +1,2 @@
+clang_registerCheckers
+clang_analyzerAPIVersionString