This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] WebAssembly doesn't support "protected" visibility
ClosedPublic

Authored by sunfish on Jun 11 2020, 1:45 PM.

Details

Reviewers
sbc100
Summary

mplement the hasProtectedVisibility() hook to indicate that, like
Darwin, WebAssembly doesn't support "protected" visibility.

On ELF, "protected" visibility is intended to be an optimization, however
in practice it often [isn't], and ELF documentation generally ranges from
[not mentioning it at all] to [strongly discouraging its use].

[isn't]: https://www.airs.com/blog/archives/307
[not mentioning it at all]: https://gcc.gnu.org/wiki/Visibility
[strongly discouraging its use]: https://www.akkadia.org/drepper/dsohowto.pdf

While here, also mention the new Reactor support in the release notes.

Diff Detail

Event Timeline

sunfish created this revision.Jun 11 2020, 1:45 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 11 2020, 1:45 PM
sbc100 accepted this revision.Jun 11 2020, 11:18 PM
sbc100 added inline comments.
clang/lib/Basic/Targets/WebAssembly.h
139

I'm not sure we need this compatibility. For sure we don't implement any special behaviour based on this value I'm not sure if we want to warn either.

For now I guess this a conservative choice, but we we should try to replace with with simply return false in the future.

Perhaps you could update the comment to be more like a TODO? lgtm either way.

This revision is now accepted and ready to land.Jun 11 2020, 11:18 PM