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

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@sam-github
Member

sam-github commented Jan 31, 2017

Use HAVE_HIDDEN when compiling zlib so it's internal symbols
have __attribute__((visibility ("hidden"))).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

deps

@sam-github

This comment has been minimized.

Show comment
Hide comment
@sam-github

sam-github Jan 31, 2017

Member

Running a build to see if all our compilers support gcc-style attributes.

EDIT: https://ci.nodejs.org/job/node-test-pull-request/6124/

Member

sam-github commented Jan 31, 2017

Running a build to see if all our compilers support gcc-style attributes.

EDIT: https://ci.nodejs.org/job/node-test-pull-request/6124/

@sam-github

This comment has been minimized.

Show comment
Hide comment
@sam-github

sam-github Jan 31, 2017

Member

I've heard

There's an issue with the latest npm update that breaks windows

So will have to wait a bit and try again.

Member

sam-github commented Jan 31, 2017

I've heard

There's an issue with the latest npm update that breaks windows

So will have to wait a bit and try again.

deps: hide zlib internal symbols
Use HAVE_HIDDEN when compiling zlib so it's internal symbols
have __attribute__((visibility ("hidden"))).
@sam-github

This comment has been minimized.

Show comment
Hide comment
@sam-github

sam-github Jan 31, 2017

Member

#11085 (comment) should fix, trying again

Member

sam-github commented Jan 31, 2017

#11085 (comment) should fix, trying again

@sam-github

This comment has been minimized.

Show comment
Hide comment
Show outdated Hide outdated deps/zlib/zlib.gyp
@@ -48,6 +48,9 @@
'.',
],
},
'defines': [
'HAVE_HIDDEN',
],

This comment has been minimized.

@bnoordhuis

bnoordhuis Feb 1, 2017

Member

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.

@bnoordhuis

bnoordhuis Feb 1, 2017

Member

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.

@sam-github

This comment has been minimized.

Show comment
Hide comment

@sam-github sam-github referenced this pull request Feb 1, 2017

Merged

deps: upgrade zlib to 1.2.11 #10980

2 of 2 tasks complete
@shigeki

shigeki approved these changes Feb 2, 2017

Both gcc and clang support this. CI is green.

jasnell added a commit that referenced this pull request Feb 2, 2017

deps: hide zlib internal symbols
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>
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Feb 2, 2017

Member

Landed in c9e5178

Member

jasnell commented Feb 2, 2017

Landed in c9e5178

@jasnell jasnell closed this Feb 2, 2017

KryDos added a commit to KryDos/node that referenced this pull request Feb 25, 2017

deps: hide zlib internal symbols
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>

@jasnell jasnell referenced this pull request Apr 4, 2017

Closed

8.0.0 Release Proposal #12220

@sam-github sam-github deleted the sam-github:zlib-use-hidden branch Apr 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment