[PATCH] D25593: [libcxx] Build with -fvisibility-inlines-hidden -- Remove 20 inline definitions from the dylib

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 23:08:36 PDT 2016


EricWF created this revision.
EricWF added reviewers: mclow.lists, emaste, dexonsmith, joker-eph, compnerd, jroelofs, danalbert, dim.
EricWF added a subscriber: cfe-commits.
Herald added subscribers: modocache, mgorny, beanz.

This patch turns on `-fvisibility-inlines-hidden` when building  the dylib. This is important so that libc++.dylib doesn't accidentally export inline-functions which are ODR used somewhere in the dylib.

On OS X this change has no effect on the current ABI of the dylib. Unfortunately on Linux there are already ~20 inline functions which are unintentionally exported by the dylib. Almost all of these are implicitly generated destructors. I believe removing these function definitions is safe because every "linkage unit" which uses these functions has its own definition, and therefore shouldn't be dependent on libc++.dylib to provide them.

Also could a FreeBSD maintainer comment on the ABI compatibility of this patch?


https://reviews.llvm.org/D25593

Files:
  CMakeLists.txt
  lib/abi/CHANGELOG.TXT
  lib/abi/x86_64-linux-gnu.abilist

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25593.74618.patch
Type: text/x-patch
Size: 6419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161014/6a1e5ab7/attachment.bin>


More information about the cfe-commits mailing list