[opus] Symbol visibility control in static builds
Alexey Izbyshev
izbyshev at ispras.ru
Thu Apr 3 03:22:04 PDT 2014
Hello,
Opus currently always sets default visibility for exported functions
when OPUS_BUILD macro is set. However, it is not a desirable behavior
when libopus is statically linked with the final binary (e.g. libxul.so
in firefox), since all symbols get exported even with
-fvisibility=hidden. In firefox, this problem is partially solved by
wrapping translation units with #pragma visibility push(hidden), which
is stronger than the command line flag, however, only libopus functions
that are actually used in firefox code are affected, and others are
still exported.
It would be great if Opus provided some macro (like OPUS_STATIC_BUILD)
that, when set, would make OPUS_EXPORT empty even when OPUS_BUILD is
set. Can it be provided in future versions?
--
Alexey Izbyshev
More information about the opus
mailing list