:: [Libbitcoin] -fvisibility=hidden
Forside
Slet denne besked
Besvar denne besked
Skribent: William Swanson
Dato:  
Til: Eric Voskuil, libbitcoin@lists.dyne.org
Emne: [Libbitcoin] -fvisibility=hidden
Hello,
I am running into a problem with our iOS builds. The updated libraries
use -fvisibility=internal as a compiler option, but the old clang
version in Xcode doesn't understand this. It does understand
-fvisiblity=hidden, however, which does basically the same thing.

While internal visibility does give the compiler more optimization
options than hidden visiblity, it is also a bit more dangerous. In
particular, it can silently break function pointers (but only if you
are unlucky). For full correctness, we would have to put a visibility
directive in front of every internal function that would be used as a
callback from another library.

So, I propose we just move everything to -fvisiblity=hidden,
un-breaking the iOS build and avoiding the potential for subtle bugs.

-William