On 4/22/2014 7:31 AM, Robert O'Callahan wrote:
It's all over the tree, inconsistently applied. Is it relevant anymore? Can
we remove it entirely, or there some places where it's still relevant, and
if so, where ... XPCOM? Or should we be using it everywhere?

Short answer: I don't think it's relevant any more.

Long answer: Each compiler and platform is a little different, so here's my take on where we are:

* Windows/MSVC. NS_HIDDEN never had any effect; symbols are hidden by default and need dllexport to be exported * Mac/GCC or clang. We compile with -fvisibility=hidden. This means that all symbols are hidden by default and you need NS_EXPORT to mark them as exported/dynamic. Declarations are treated as dynamic. However because Mach-O executables use direct relocations, there is no actual difference between the generated code referencing a hidden or dynamic symbol, so we're fine. * Linux/GCC or clang. We compile with #pragma visibility. This means that all symbols and declarations are treated as hidden by default and require NS_EXPORT if they are exported/dynamic.

I believe that we're also using #pragma visibility on Android and B2G, but somebody should probably check. We should be!

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to