Skip to content

EMSDK support for wasm backend #6350

Closed
Closed
@jgravelle-google

Description

@jgravelle-google

As part of using the wasm backend by default, we should make it easy for users to download and install it. This means having emsdk install upstream LLVM instead of fastcomp.

Steps:

  1. Add wasm backend to emsdk behind a flag
  2. Switch to wasm backend by default (fastcomp behind a flag)
  3. Deprecate fastcomp backend

There's the question of how to organize installing the two backends. The options I know of are

  1. Download only one backend
    • need to rerun emsdk install to download the other backend later (which is bound to be a frustrating UX)
    • need to emsdk activate to change backends
  2. Download both backends
    • no need to download/compile the other backend later, but instead frontloads that cost
    • may need to edit ~/.emscripten to change the LLVM_ROOT variable
  3. Download one LLVM that has both backends enabled
    • integrate upstream changes into fastcomp branch to get latest wasm backend, build fastcomp with js and wasm32 targets enabled
    • need to merge regularly going forward
    • changing backends is a matter of changing ~/.emscripten to set... something. Currently EMCC_WASM_BACKEND is an environment flag, can .emscripten set that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions