diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h index 030d79ea2ecc1..e09e21d908022 100644 --- a/clang/lib/Basic/Targets/WebAssembly.h +++ b/clang/lib/Basic/Targets/WebAssembly.h @@ -132,7 +132,14 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { } 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: diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index ea1fad1f6390c..7d71d0c58a4c1 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -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 -----------------------------