[libcxx-commits] [PATCH] D66970: [libc++] Explicitly provide a list of exported symbols for libc++
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 29 12:39:51 PDT 2019
ldionne created this revision.
ldionne added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous, christof, mgorny.
Herald added a project: libc++.
ldionne added a comment.
Work on this patch was prompted by the CI breakage on GCC caused by https://reviews.llvm.org/D62868. Because the build bots using GCC are on Linux, and this patch removes `-fvisibility=hidden` when building on Linux, it will silence the CI failures as a side effect.
However, in the future, we can add a similar list using linker version files for Linux, which should work with both GCC and Clang (because it's linker specific anyway).
Controlling what symbols are exported using visibility annotations at
the source level doesn't work very well, because those annotations are
non-standard. The annotations differ subtly from compiler to compiler,
and as a result it's difficult to obtain the same ABI using all compilers.
By defining an explicit list of symbols, we control exactly which symbols
are exported in all cases and we can eventually get rid of visibility
annotations in the source.
Note that this commit only provides such explicit control when building
on Apple platforms. Support for Linux will be coming later.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 107067 bytes
Desc: not available
More information about the libcxx-commits