This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Make sure we can build with -fvisibility=hidden on Linux
ClosedPublic

Authored by ldionne on Nov 16 2018, 10:59 AM.

Details

Summary

This commit marks a few functions as hidden and removes them from the ABI list
on Linux such that libc++ can be built with -fvisibility=hidden. The functions
marked as hidden by this patch were exported from the shared object only
because they were implicitly instantiated function templates. It is safe
to stop exporting those symbols from the shared object because nobody could
actually depend on them: implicit instantiations are not taken from shared
objects.

The symbols removed in this commit are basically the same that had been
removed in https://reviews.llvm.org/D53868, but that patch had to be reverted
because it broke the build (because the functions were not marked as hidden
like this patch does).

Diff Detail

Repository
rCXX libc++

Event Timeline

ldionne created this revision.Nov 16 2018, 10:59 AM

I'm shipping this because I have other changes depending on it and we already reviewed the ABI changes in https://reviews.llvm.org/D53868. Please LMK if you have concerns with this patch and I can revert it or fix them post-commit.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 21 2018, 8:27 AM
This revision was automatically updated to reflect the committed changes.