>> Which LT_INIT option would enable the hidden symbol visibility support?
> Libtool is all about supporting a core set of features in a portable way.
It is not about my use case, which I solved, it is about making
-fvisibility=hidden into a core Libtool feature. I will summarize and
never bother you again.
1) Compile-time -fvisibility=hidden enables additional optimizations
not available with link-time -export-symbols. Both are recommended
2) This is about portable ELF format. Therefore LT_INIT(elf-hidden)
would be as portable as LT_INIT(win32-dll) if not more. The source
code visibility attributes align with dllexport. The request as about
an option, not the default mode.
3) The broad compiler consensus is there.Why would libtool stay aside
when the debate is over. It is not much different from -fPIC
- GCC does it https://gcc.gnu.org/wiki/Visibility
- clang does it https://clang.llvm.org/docs/LTOVisibility.html
- Intel C++ does it https://software.intel.com/en-us/node/522783
- IBM XL C/C++ does both -fvisibility=hidden and -qvisibility=hidden
- Solaris Studio does -xldscope=hidden and rumored to support
- HP C compiler does -B symbolic