BinaryBuilder.jl icon indicating copy to clipboard operation
BinaryBuilder.jl copied to clipboard

Experiment with setting `-fvisibility=protected` when compiling for Linux

Open staticfloat opened this issue 5 years ago • 1 comments

Jameson assures me this should actually be the default for most packages and is a good optimization opportunity. I have no idea of the ramifications of this in terms of compatibility, we should at the very least try building some software with it turned on and see if there's any perf difference.

Easiest way would to be to add this to gcc_flags!() under a Sys.islinux(p) conditional in BinaryBuilderBase.jl, then try building some packages.

staticfloat avatar Sep 29 '20 21:09 staticfloat

This could be somewhat problematic for libraries that aren't designed to work with it, since not all libraries properly export their symbols in the symbol table with default visibility (and just rely on the fact that the symbols get that by default). Also, I don't know if there is a major perf difference between hidden and all default - it will only affect the symbol table so to see a noteworthy difference I would imagine the library needs to have a lot of symbols.

imciner2 avatar Feb 05 '21 12:02 imciner2