-
Notifications
You must be signed in to change notification settings - Fork 465
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
Make 'nothing' target a static library #348
Make 'nothing' target a static library #348
Conversation
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty.
Hi @gabrielschulhof I tried this update, but when I launch the tests I will get an error. I attach you the screenshot. |
Hi @gabrielschulhof for curiosity I tried to do a little experiment and it works now.
{
'targets': [
{
'target_name': 'nothing',
'type': 'static_library',
'sources': [
'nothing.c'
],
},
{
'target_name': 'node-api',
'type': 'static_library',
'sources': [
'node_api.cc',
'node_internals.cc',
],
'defines': [
'EXTERNAL_NAPI',
],
'cflags_cc': ['-fvisibility=hidden']
}
]
} Searching on the web I found this:
Maybe we can use some flags to do the same. |
@NickNaso we can definitely change it to be like that, as long as it doesn't produce a |
@gabrielschulhof It produces |
@NickNaso that's fine. It's |
@NickNaso I added an empty |
@gabrielschulhof It worked! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Excellent! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: #348 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Landed as 211ed38 |
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: nodejs/node-addon-api#348 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: nodejs/node-addon-api#348 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: nodejs/node-addon-api#348 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: nodejs/node-addon-api#348 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
This avoids the creation of
nothing.node
files in other projects.These files will otherwise be identified as non-N-API modules, even
though they are empty.