summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2016-07-08 16:20:57 +0000
committerJohn Brawn <john.brawn@arm.com>2016-07-08 16:20:57 +0000
commit83cd1c59c4a65affb14cbe933c1dda680cfa830d (patch)
tree1fc8c66be404e9e2ec0999ba0fd2bbe87e25a198 /examples
parentbb6076f3bf0f1aeca6089de675c2b9b13210457d (diff)
downloadclang-83cd1c59c4a65affb14cbe933c1dda680cfa830d.tar.gz
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
Diffstat (limited to 'examples')
-rw-r--r--examples/analyzer-plugin/CMakeLists.txt3
-rw-r--r--examples/analyzer-plugin/SampleAnalyzerPlugin.exports2
2 files changed, 4 insertions, 1 deletions
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