New issue
Advanced search Search tips

Issue 810127 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 709716



Sign in to add a comment

[zlib]: Enable use of HAVE_HIDDEN

Project Member Reported by cavalcantii@chromium.org, Feb 7 2018

Issue description

Hidden symbols has quite a few advantages (https://gcc.gnu.org/wiki/Visibility), and zlib makes use of this compiler feature through ZLIB_INTERNAL.

Issue is it seems we don't define HAVE_HIDDEN anywhere, as a result ZLIB_INTERNAL won't use __attribute__(visibility("hidden")) and will be just an empty define.


 
Blockedon: 709716

Comment 2 by noel@chromium.org, Feb 9 2018

Cc: noel@chromium.org
Looking at the code src/third_party/zlib/zutil.h

    16: #ifdef HAVE_HIDDEN
    17: #  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
    18: #else
    19: #  define ZLIB_INTERNAL
    20: #endif

Agree, we don't define HAVE_HIDDEN anywhere.  Thank goodness for name mangling.

ZLIB_INTERNAL seems to used in zlib to indicate that an API is internal to zlib, and not part of the public API.
Cc: cblume@chromium.org

Sign in to add a comment