]> git.tdb.fi Git - builder.git/blob - plugins/gnu/gnuplugin.cpp
Make it possible to use built-in plugins
[builder.git] / plugins / gnu / gnuplugin.cpp
1 #include "gnuplugin.h"
2 #include "gnutools.h"
3
4 void GnuPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
5 {
6         toolchain.add_toolchain(new GnuTools(builder, arch));
7 }
8
9
10 #ifdef GNUTOOLS_BUILD
11 #if defined(_WIN32)
12 #define GNUTOOLS_API __declspec(dllexport)
13 #elif defined(__GNUC__)
14 #define GNUTOOLS_API __attribute__((visibility("default")))
15 #else
16 #define GNUTOOLS_API
17 #endif
18
19 extern "C"
20 GNUTOOLS_API Plugin *create_plugin(Builder &builder)
21 {
22         return new GnuPlugin(builder);
23 }
24 #endif