Gcc visibility tweak improvement

i’ve noticed that on gcc, compiling vst shared libraries results in quite big objects. i’ve tweaked a bit with gcc and i found the attribute((visibility)) pragma.

if you do like this in juce_premake.lua

then in VSTWrapper.cpp code you add:

#if JUCE_LINUX // blah blah

extern "C" __attribute__ ((visibility("default"))) AEffect* main_plugin (audioMasterCallback audioMaster) asm ("main");

extern "C" __attribute__ ((visibility("default"))) AEffect* main_plugin (audioMasterCallback audioMaster)

and you build your pluguin with -fvisibility=hidden linkflag (audio plugin’s premake.lua)…

i’ve been able to smash more than 600kb from the shared library (and things work the same, both statically and dinamically)!

it’s a small tweak but good to have !!

ah - good tip! I’ll put that into the build - thanks!