From 8680bb9f1a0163cfbdc4443c1eb2b56c5e443616 Mon Sep 17 00:00:00 2001 From: Yihong Wang Date: Sat, 21 Oct 2017 23:16:50 -0700 Subject: 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 PR-URL: https://github.com/nodejs/node/pull/16565 Refs: https://github.com/nodejs/node/pull/14986#issuecomment-332758206 Reviewed-By: Gireesh Punathil Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- src/node_perf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node_perf.cc') diff --git a/src/node_perf.cc b/src/node_perf.cc index 155f1e66e4..a27a1b3dd7 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -388,4 +388,4 @@ void Init(Local target, } // namespace performance } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(performance, node::performance::Init) +NODE_BUILTIN_MODULE_CONTEXT_AWARE(performance, node::performance::Init) -- cgit v1.2.3