This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add Emscripten OS definition + small_printf
ClosedPublic

Authored by kripken on Apr 2 2019, 5:27 PM.

Details

Summary

The Emscripten OS provides a definition of EMSCRIPTEN, and also that it
supports iprintf optimizations.

Also define small_printf optimizations, which is a printf with float support
but not long double (which in wasm can be useful since long doubles are 128
bit and force linking of float128 emulation code). This part is based on
sunfish's https://reviews.llvm.org/D57620 (which can't land yet since
the WASI integration isn't ready yet).

Emscripten side: https://github.com/emscripten-core/emscripten/pull/8348

Diff Detail

Event Timeline

kripken created this revision.Apr 2 2019, 5:27 PM
sbc100 accepted this revision.Apr 2 2019, 5:46 PM
This revision is now accepted and ready to land.Apr 2 2019, 5:46 PM
This revision was automatically updated to reflect the committed changes.