diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h --- a/clang/lib/Basic/Targets/WebAssembly.h +++ b/clang/lib/Basic/Targets/WebAssembly.h @@ -132,7 +132,14 @@ } bool hasExtIntType() const override { return true; } + + bool hasProtectedVisibility() const override { + // For compatibility, 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 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -144,8 +144,14 @@ 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 -----------------------------