Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9.x backport] src: explicitly register built-in modules #17625

Closed
wants to merge 0 commits into from

Conversation

yhwang
Copy link
Member

@yhwang yhwang commented Dec 12, 2017

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 [email protected]
Original PR-URL: #16565
Refs: #14986 (comment)
Reviewed-By: Gireesh Punathil [email protected]
Reviewed-By: Anna Henningsen [email protected]
Reviewed-By: Ben Noordhuis [email protected]
Reviewed-By: James M Snell [email protected]
Reviewed-By: Colin Ihrig [email protected]

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. v9.x labels Dec 12, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
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 <[email protected]>
Refs: #14986 (comment)
Backport-PR-URL: #17625
PR-URL: #16565
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins
Copy link
Contributor

landed in a37dce4

@yhwang yhwang deleted the backport-16565 branch December 12, 2017 07:05
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
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 <[email protected]>
Refs: #14986 (comment)
Backport-PR-URL: #17625
PR-URL: #16565
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants