-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Link libuv & zlib with --whole-archive #17444
Comments
This is definatly an interesting suggestion. Some points that come to mind:
Bottom line, I think I'm +1 on this. |
P.S. I just saw that the full headers files for both zlib and libuv are in the headers tarball, so this is actually a bugfix. P.P.S. Relevant also for Windows https://docs.microsoft.com/en-us/cpp/build/reference/wholearchive-include-all-library-object-files where it is probably even more usefull since there is no real |
Probably not all that much – these libs are tiny compared to e.g. V8, and they don’t follow a one-function-per-file pattern.
Fwiw I raised this issue in response to not seeing the symbols from libuv/libuv#1657 included in the Node binary, which in turn was made with the intention of having libuv be ABI-stable indefinitely.
Yeah, exactly. :) |
FWIW On AIX we already export these symbols (and more) via |
I'm +1 as my assumption is today we just get a semi-random set (those used within Node.js) which does not make sense given we include the full headers. |
Btw, I opened this as an issue because I really don’t know enough about GYP to have this figured out myself at this point. I’m convinced it should happen, though. The obvious approach could be copying what we do for openssl, but that seems like it’s done in a kind of hacky way to begin with. |
@yhwang, I know you have been working on the static/shared lib which has required a number of changes to the gyp files and even overcoming issues with symbols not being included. Any chance you could take a look at this issue ? |
Sure this is what I learned/know so for: Adding I can work on the exp generator after I finish the static/shared lib refine task. Then enable the libuv and zlib would be easy (I guess :-p). [edit] Forgot to mention that we can also compile node into shared and static lib with current node.gyp.
|
Update more findings. Actually, for |
We have mkssldef because openssl and zlib don't export functions inline but libuv does (the |
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Fixes: nodejs#17444 Signed-off-by: Yihong Wang <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: nodejs#17444 PR-URL: nodejs#18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: #17444 PR-URL: #18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: #17444 PR-URL: #18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: #17444 PR-URL: #19013 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: nodejs#17444 PR-URL: nodejs#19013 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: nodejs#17444 PR-URL: nodejs#18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: nodejs#17444 PR-URL: nodejs#19013 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: #17444 PR-URL: #18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <[email protected]> Fixes: #17444 PR-URL: #18383 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: nodejs#17444 PR-URL: nodejs#19013 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: #17444 Backport-PR-URL: #22380 PR-URL: #19013 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
libuv and zlib symbols are also purposefully re-exported by Node.js for use in Addons. Refs: nodejs/node#17444
Currently, we link V8 and openssl with
-Wl,--whole-archive
into thenode
binary, but we should probably do the same for libuv and maybe zlib since we want to expose their entire functionality to userland addons./cc @refack @bnoordhuis
The text was updated successfully, but these errors were encountered: