-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
deps: hide zlib internal symbols #11082
Conversation
Running a build to see if all our compilers support gcc-style attributes. EDIT: https://ci.nodejs.org/job/node-test-pull-request/6124/ |
I've heard
So will have to wait a bit and try again. |
Use HAVE_HIDDEN when compiling zlib so it's internal symbols have __attribute__((visibility ("hidden"))).
71c7ccb
to
1ae7920
Compare
#11085 (comment) should fix, trying again |
deps/zlib/zlib.gyp
Outdated
@@ -48,6 +48,9 @@ | |||
'.', | |||
], | |||
}, | |||
'defines': [ | |||
'HAVE_HIDDEN', | |||
], |
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.
Move this to the 'OS!="win"'
conditional below. The __attribute__((visibility("hidden")))
doesn't work with Visual Studio (see https://ci.nodejs.org/job/node-compile-windows/6701/label=win-vs2015/consoleFull) and it probably isn't needed anyway because we use deps/zlib/win32/zlib.def to control what is and isn't exported.
Alternatively, if you teach tools/mkssldef.py to generate UNIX linker maps, we can unify the two approaches.
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.
Both gcc and clang support this. CI is green.
Use HAVE_HIDDEN when compiling zlib so it's internal symbols have __attribute__((visibility ("hidden"))). PR-URL: #11082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Landed in c9e5178 |
Use HAVE_HIDDEN when compiling zlib so it's internal symbols have __attribute__((visibility ("hidden"))). PR-URL: nodejs#11082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Use HAVE_HIDDEN when compiling zlib so it's internal symbols
have
__attribute__((visibility ("hidden")))
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
deps