functioninstallWasmToolchain
Installs the sysroot wasm external "C" code is compiled against.
Information
Downloads the WebAssembly sysroot (wasi-libc headers, libc.so
and the compiler-rt builtins) that the package index's prebuilt wasm modules are
built with, unless it is installed already, and returns its path. The wasm-jit
target compiles Include sources against it with the system clang.
With cxx, libc++'s headers and libc++.so are added,
for C++ code compiled with -fwasm-exceptions.
Returns the empty string if the index has none or the download fails.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | cxx | false | Also libc++, for C++ code |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | sysroot |