mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[WebAssembly] WebAssembly doesn't support "protected" visibility
Implement 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.
This commit is contained in:
@@ -132,7 +132,14 @@ private:
|
||||
}
|
||||
|
||||
bool hasExtIntType() const override { return true; }
|
||||
|
||||
bool hasProtectedVisibility() const override {
|
||||
// TODO: For now, continue to advertise "protected" support for
|
||||
// Emscripten targets.
|
||||
return getTriple().isOSEmscripten();
|
||||
}
|
||||
};
|
||||
|
||||
class LLVM_LIBRARY_VISIBILITY WebAssembly32TargetInfo
|
||||
: public WebAssemblyTargetInfo {
|
||||
public:
|
||||
|
||||
@@ -144,8 +144,14 @@ Changes to the AVR Target
|
||||
Changes to the WebAssembly Target
|
||||
---------------------------------
|
||||
|
||||
During this release ...
|
||||
* Programs which don't have a "main" function, called "reactors" are now
|
||||
properly supported, with a new `-mexec-model=reactor` flag. Programs which
|
||||
previously used `-Wl,--no-entry` to avoid having a main function should
|
||||
switch to this new flag, so that static initialization is properly
|
||||
performed.
|
||||
|
||||
* `__attribute__((visibility("protected")))` now evokes a warning, as
|
||||
WebAssembly does not support "protected" visibility.
|
||||
|
||||
Changes to the OCaml bindings
|
||||
-----------------------------
|
||||
|
||||
Reference in New Issue
Block a user