WASI SDK setupΒΆ
The build system uses the Toolchain for WASM modules to build the test modules that are required to be able to run the test cases contained in the test directory. The SDK is expected to be installed in the host system, and the build system can be customized to adapt to different configurations using two macros:
WASI_PREFIX
: It is a prefix that is added to every command of the toolchain.
WASI_SYSROOT
: It is the location of the libc directory structure.
The official debian package distributed by the WASI release
installs the binaries in /opt/wasi-sdk/bin/
,
so if that package is used then
the build system should be used as follows:
make WASI_PREFIX=/opt/wasi-sdk/bin/
If the clang toolchain installed in the system supports wasi and it is desired to use the libc installed with the WASI release then the build system can be invoked like:
make WASI_SYSROOT=/opt/wasi-sdk/share/wasi-sysroot/
Of course,
in any case the parameters can be configured
in the personal config.mk
as described in Personal configuration.