]> git.tdb.fi Git - builder.git/blob - plugins/clang/clangplugin.cpp
Add visibility decorations to the library and plugins
[builder.git] / plugins / clang / clangplugin.cpp
1 #include "clangplugin.h"
2 #include "clangtools.h"
3
4 void ClangPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
5 {
6         toolchain.add_toolchain(new ClangTools(builder, arch));
7 }
8
9
10 #if defined(_WIN32)
11 #define CLANGTOOLS_API __declspec(dllexport)
12 #elif defined(__GNUC__)
13 #define CLANGTOOLS_API __attribute__((visibility("default")))
14 #else
15 #define CLANGTOOLS_API
16 #endif
17
18 extern "C"
19 CLANGTOOLS_API Plugin *create_plugin(Builder &builder)
20 {
21         return new ClangPlugin(builder);
22 }