GHC WebAssembly Weekly Update, 2022-12-07

Previous update:

  • Working on debug support for wasm NCG. It’s still hard. The following items are all result of procrastination on this one.
  • Updated ghc-wasm-meta, added building guide & tips for browsers.
  • Don’t add dwarf info to non-debug rts ways (!9464). Otherwise the output wasm modules will contain dwarf sections in rts and need extra wasm-opt flags to strip those away.
  • Optional support for using wasm tail call extension (!9457). Tail call extension is not widely supported in wasm engines yet, but it’s still meaningful (and easy) for us to support it early, so all our testing/benchmarking can take it into account.
  • Experimented with LLVM LTO again: enabling LTO in the wasi-sdk sysroot, or in the unregisterised codegen when compiling C. Unfortunately LLVM LTO for wasm still does more harm than good. Apart from spurious link-time warnings, it may generate modules that crash at runtime. It’s a pity and there’s little I can do about it; my experience with LLVM LTO on x86_64 has been very positive though.
  • Add a hadrian flavour transformer (!9472) to enable whole Core bindings in stage1 interface files. Why nobody blogged about this cool thing yet?
  • Minor updates to GHC wasm CI matrix patch (!9428).
  • Fixed windows build in upstream wasi-sdk (#265) by replacing msvc with msys2 clang64. This helps in getting wasi-sdk 17 release out which bumps llvm from 14 to 15.
  • Discovered a pretty weird bug in wasmedge (#2148).