[PATCH] D75655: [Docs] Document -lto-whole-program-visibility
Peter Collingbourne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 16:20:29 PDT 2020
pcc added a comment.
I think that the part of the description beginning "This can be used when..." is somewhat misleading since you could pretty much say the same thing about specifying `-fvisibility=hidden -fwhole-program-vtables` at compile time.
I think it would be better to focus on the specific capability that `--lto-visibility-hidden` gives you over just compiling with `-fvisibility=hidden`. Let's keep @evgeny777 's use case out of this because I still have concerns about it being dangerous. Can you simply say:
"This flag can be used to defer specifying whether classes have hidden LTO visibility until link time."
Then, in order to try to forbid inappropriate use of the symbols, you could add:
"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."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75655/new/
https://reviews.llvm.org/D75655
More information about the cfe-commits
mailing list