X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=plugins%2Fgnu%2Fgnuplugin.cpp;h=db8c300eeb6598237e569e0863df0149552c2482;hb=1df42c314669f30fe1d82f02fdfeeff19f92964e;hp=a758b9a2c0c23d79e58b52c766d721624664e2ac;hpb=b7ecf9d6203492a43bf98e7c611b81c5594cbd00;p=builder.git diff --git a/plugins/gnu/gnuplugin.cpp b/plugins/gnu/gnuplugin.cpp index a758b9a..db8c300 100644 --- a/plugins/gnu/gnuplugin.cpp +++ b/plugins/gnu/gnuplugin.cpp @@ -7,8 +7,16 @@ void GnuPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const } +#if defined(_WIN32) +#define GNUTOOLS_API __declspec(dllexport) +#elif defined(__GNUC__) +#define GNUTOOLS_API __attribute__((visibility("default"))) +#else +#define GNUTOOLS_API +#endif + extern "C" -Plugin *create_plugin(Builder &builder) +GNUTOOLS_API Plugin *create_plugin(Builder &builder) { return new GnuPlugin(builder); }