summaryrefslogtreecommitdiffstats
path: root/libcxx/docs
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2018-10-25 12:13:43 +0000
committerLouis Dionne <ldionne@apple.com>2018-10-25 12:13:43 +0000
commit9b3222f6134f40b68e16faf694ed9e97bc9fd325 (patch)
tree701f6ead66e1873d6cbab03cf2d4917c61417822 /libcxx/docs
parent77c26aebdaae0196fc131eb3b613dac3b0023814 (diff)
downloadbcm5719-llvm-9b3222f6134f40b68e16faf694ed9e97bc9fd325.tar.gz
bcm5719-llvm-9b3222f6134f40b68e16faf694ed9e97bc9fd325.zip
[libc++] Make sure we can build libc++ with -fvisibility=hidden
Summary: When building with -fvisibility=hidden, some symbols do not get exported from libc++.dylib. This means that some entities are not explicitly given default visibility in the source code, and that we rely on the fact -fvisibility=default is the default. This commit explicitly gives default visibility to those symbols to avoid being dependent on the command line flags used. The commit also remove symbols from the dylib -- those symbols do not actually need to be exported from the dylib and this should not be an ABI break. Finally, in the future, we may want to mark the whole std:: namespace as having hidden visibility (to switch from opt-out to opt-in), in which case the changes done in this commit will be required. Reviewers: EricWF Subscribers: mgorny, christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D52662 llvm-svn: 345260
Diffstat (limited to 'libcxx/docs')
-rw-r--r--libcxx/docs/DesignDocs/VisibilityMacros.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index 08debbcddf5..d0d4f0adb22 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -22,11 +22,11 @@ Visibility Macros
Mark a symbol as being exported by the libc++ library. This attribute must
be applied to the declaration of all functions exported by the libc++ dylib.
-**_LIBCPP_EXTERN_VIS**
+**_LIBCPP_EXPORTED_FROM_ABI**
Mark a symbol as being exported by the libc++ library. This attribute may
- only be applied to objects defined in the libc++ library. On Windows this
- macro applies `dllimport`/`dllexport` to the symbol. On all other platforms
- this macro has no effect.
+ only be applied to objects defined in the libc++ runtime library. On Windows,
+ this macro applies `dllimport`/`dllexport` to the symbol, and on other
+ platforms it gives the symbol default visibility.
**_LIBCPP_OVERRIDABLE_FUNC_VIS**
Mark a symbol as being exported by the libc++ library, but allow it to be
OpenPOWER on IntegriCloud