[PATCH] D75655: [Docs] Document -lto-whole-program-visibility
Teresa Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 19:47:54 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG72bdb41a06a2: [Docs] Document --lto-whole-program-visibility (authored by tejohnson).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75655/new/
https://reviews.llvm.org/D75655
Files:
clang/docs/LTOVisibility.rst
Index: clang/docs/LTOVisibility.rst
===================================================================
--- clang/docs/LTOVisibility.rst
+++ clang/docs/LTOVisibility.rst
@@ -35,6 +35,16 @@
(e.g. classes declared in unnamed namespaces) also receive hidden LTO
visibility.
+During the LTO link, all classes with public LTO visibility will be refined
+to hidden LTO visibility when the ``--lto-whole-program-visibility`` lld linker
+option is applied (``-plugin-opt=whole-program-visibility`` for gold). This flag
+can be used to defer specifying whether classes have hidden LTO visibility until
+link time, to allow bitcode objects to be shared by different LTO links.
+Due to an implementation limitation, symbols associated with classes with hidden
+LTO visibility may still be exported from the binary when using this flag. It is
+unsafe to refer to these symbols, and their visibility may be relaxed to hidden
+in a future compiler release.
+
A class defined in a translation unit built without LTO receives public
LTO visibility regardless of its object file visibility, linkage or other
attributes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75655.287816.patch
Type: text/x-patch
Size: 1110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200826/aab51181/attachment-0001.bin>
More information about the cfe-commits
mailing list