On 27/04/2023 07.53, Paul Gevers wrote:
Control: tags -1 moreinfo
Hi Andreas,
On 20-04-2023 19:16, Andreas Beckmann wrote:
Looks like I forgot to merge the -fvisibility=hidden changes from
src:spirv-llvm-translator-14 (and the corresponding removal of 4500+
useless C++ symbols from the .symbols file) into
src:spirv-llvm-translator-15. Just noticed while preparing -16 for
experimental.
I'm a bit paranoid and not very well versed on C++ symbols. Can you
please summarize (or point to a short explanation elsewhere on the
internet) why they are useless and can be safely *removed*? In other
words, why is it not possible that something already uses those symbols?
(I recall rra had a good explanation why symbol files were rather
useless for C++, but from memory that feels not exactly the same)
The symbols I want to get rid of with -fvisibiity=hidden mostly stem
from template instantiations of the standard template library and llvm.
Some parts of them usually change between compiler versions since
internal implementation details of the template libraries change - this
symbol disappearance is ignored and does not result in bumped sonames or
package names. Even different optimization levels can influence the
generated symbols (by (not) inlining some bits).
Also all potential users of these symbols should already have them on
their own since the templates get instantiated during compilation
(unless they do very special stuff), so the "external" ones won't be
considered.
Some further reading on hidden visibility:
https://gcc.gnu.org/wiki/Visibility
Andreas
PS: for pocl I managed to get visibility=hidden support upstream and
enabled by default