-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
build: don't add libraries when --enable-static #14837
Conversation
Currently when building with --enabled-static the cctest target will include libraries to be linked regardless. This commit adds a condition to only add the libraries when dynamically linking. Fixes: nodejs#13500
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, I suppose, but that 'libraries'
list is such a hideous hack.
I'll take another look at this and see how this could be done differently. I'll do that as a separate PR after sorting out the failing test when using |
All's fair in love and @danbev if you're up to it, for cleanliness you could define the list as a variable: 'variables': {
...
'obj_files': [
'<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)',
...
]
...
}
...
'conditions': [
['node_target_type!="static_library"', {
'libraries': [ '<@(obj_files)' ]
... |
The test failure I mentioned above was |
@danbev pushed a suggested workaround for the test. Feel free to force push it out... |
Thanks @refack. The workaround I had in mind was to still create the node executable which is not created when building with |
Ack. Obviously...
I like that a lot (also for |
Currently when building with --enabled-static the cctest target will include libraries to be linked regardless. This commit adds a condition to only add the libraries when dynamically linking. PR-URL: nodejs#14837 Fixes: nodejs#13500 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in be63c26 |
I suspect this PR of breaking the Windows build with the following error:
Revert CI to verify: https://ci.nodejs.org/job/node-test-commit-windows-fanned/11154/ edit: yep, it's this PR. |
I'm looking into it now, thanks |
Currently when building with --enabled-static the cctest target will
include libraries to be linked regardless. This commit adds a condition
to only add the libraries when dynamically linking.
Fixes: #13500
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build