]> git.tdb.fi Git - builder.git/blobdiff - plugins/clang/clangplugin.cpp
Add visibility decorations to the library and plugins
[builder.git] / plugins / clang / clangplugin.cpp
index a6b3bbb498dc483dfb7ba7b81962db5b20725b4b..eecbdc6128f21181118ca6f73172b81e97fa4263 100644 (file)
@@ -7,8 +7,16 @@ void ClangPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) cons
 }
 
 
+#if defined(_WIN32)
+#define CLANGTOOLS_API __declspec(dllexport)
+#elif defined(__GNUC__)
+#define CLANGTOOLS_API __attribute__((visibility("default")))
+#else
+#define CLANGTOOLS_API
+#endif
+
 extern "C"
-Plugin *create_plugin(Builder &builder)
+CLANGTOOLS_API Plugin *create_plugin(Builder &builder)
 {
        return new ClangPlugin(builder);
 }