| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, I suppose, but that 'libraries' list is such a hideous hack.
Sorry, something went wrong.
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 --enable-static. |
Sorry, something went wrong.
All's fair in love and GYP. For MSVS it circumvents the horrible project dependencies, so I don't hate it. @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)' ]
... |
Sorry, something went wrong.
|
The test failure I mentioned above was test/parallel/test-process-config.js which compares the configuration in config.gypi with the one compiled. But when using --enable-static no node executable is created and when the test run they are using the previous version (if any) and there is a difference, hence the test failure. I leaning towards this is a non issue and not worth the time coming up with a workaround. |
Sorry, something went wrong.
|
@danbev pushed a suggested workaround for the test. Feel free to force push it out... |
Sorry, something went wrong.
Thanks @refack. The workaround I had in mind was to still create the node executable which is not created when building with --enable-static. If node was not built previously there will be an error earlier as there will be no out/Release/node. The idea I had was to perhaps have a conditional target that would build an executable even when --enable-static is used, but that executable would link to the static library libnode.a. But I'm not sure if this is worth the effort. |
Sorry, something went wrong.
Ack. Obviously...
I like that a lot (also for dynamic_library building) but I agree that's out of scope for this PR. |
Sorry, something went wrong.
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>
|
I suspect this PR of breaking the Windows build with the following error: LINK : fatal error LNK1181: cannot open input file 'c:\workspace\node-compile-windows\label\win-vs2015\Release\obj\node\gen\node_javascript.o' Revert CI to verify: https://ci.nodejs.org/job/node-test-commit-windows-fanned/11154/ edit: yep, it's this PR. |
Sorry, something went wrong.
I'm looking into it now, thanks |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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
Affected core subsystem(s)
build