diff options
author | Yihong Wang <yh.wang@ibm.com> | 2017-10-22 09:16:50 +0300 |
---|---|---|
committer | Gibson Fahnestock <gibfahn@gmail.com> | 2017-11-14 02:17:34 +0300 |
commit | 8680bb9f1a0163cfbdc4443c1eb2b56c5e443616 (patch) | |
tree | 16d97c77379adba2d45dc17787f314b9e3cb1b1b /src/node_i18n.cc | |
parent | 21a7459d490d832d5d547833d527083e460999e1 (diff) |
src: explicitly register built-in modules
Previously, built-in modules are registered before main() via
__attribute__((constructor)) mechanism in GCC and similiar
mechanism in MSVC. This causes some issues when node is built as
static library. Calling module registration function for built-in
modules in node::Init() helps to avoid the issues.
Signed-off-by: Yihong Wang <yh.wang@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/16565
Refs: https://github.com/nodejs/node/pull/14986#issuecomment-332758206
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_i18n.cc')
-rw-r--r-- | src/node_i18n.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_i18n.cc b/src/node_i18n.cc index 30f421a8b83..e16831fd62b 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -874,6 +874,6 @@ void Init(Local<Object> target, } // namespace i18n } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(icu, node::i18n::Init) +NODE_BUILTIN_MODULE_CONTEXT_AWARE(icu, node::i18n::Init) #endif // NODE_HAVE_I18N_SUPPORT |