According to http://gcc.gnu.org/wiki/Visibility,
With
-fvisibility=hidden
, you are telling GCC that every declaration not explicitly marked with a visibility attribute has a hidden visibility.
And
-fvisibility-inlines-hidden
causes all inlined class member functions to have hidden visibility
When I compile a very large project, it seems to me that adding -fvisibility-inlines-hidden
together with -fvisibility=hidden
can indeed hide more symbols compared to using -fvisibility=hidden
along. But I cannot find a minimum example that shows the exact difference where -fvisibility-inlines-hidden
take effects. I also tried this example but failed to see the effects of latter.
Can someone show me a minimum example showing that -fvisibility-inlines-hidden
are still necessary if I'm already using -fvisibility=hidden
? I'm using GCC 5.3.0