src: add default visibility to NODE_MODULE
authorBen Noordhuis <info@bnoordhuis.nl>
Tue, 4 Mar 2014 13:10:05 +0000 (14:10 +0100)
committerFedor Indutny <fedor.indutny@gmail.com>
Wed, 5 Mar 2014 11:26:09 +0000 (15:26 +0400)
commitbd8a5755dceda415eee147bc06574f5a30abb0d0
treec000bd57c005b2ae6c852220d3fd6ccee7a1b7a5
parent6eb4d1d15ca8d2b82cf9db99d56633357ccc3320
src: add default visibility to NODE_MODULE

It's currently not really possible to compile native add-ons with
-fvisibility=hidden because that also hides the struct containing
the module definition.

The NODE_MODULE() and NODE_MODULE_DECL() macros are structured in
a way that makes it impossible to add a visibility attribute manually
so there is no escape hatch there.

That's why this commit adds an explicit visibility attribute to
the module definition.  It doesn't help with node.js releases that
are already out there but at least it improves the situation going
forward.
src/node.h