File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,21 @@ sources mentioned above, and compile with
2626
2727A typical installation from the release binaries might look like the following:
2828``` shell script
29- wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-[VERSION]/wasi-sdk-[VERSION]-linux.tar.gz
30- tar xvf wasi-sdk-[VERSION]-linux.tar.gz
29+ export WASI_VERSION=12
30+ export WASI_VERSION_FULL=${WASI_VERSION} .0
31+ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION} /wasi-sdk-${WASI_VERSION_FULL} -linux.tar.gz
32+ tar xvf wasi-sdk-${WASI_VERSION_FULL} -linux.tar.gz
3133```
3234
3335## Use
3436
3537Use the clang installed in the wasi-sdk directory:
3638``` shell script
37- CC=" [WASI_SDK_PATH]/bin/clang --sysroot=[WASI_SDK_PATH]/share/wasi-sysroot"
39+ export WASI_SDK_PATH=` pwd` /wasi-sdk-${WASI_VERSION_FULL}
40+ CC=" ${WASI_SDK_PATH} /bin/clang --sysroot=${WASI_SDK_PATH} /share/wasi-sysroot"
3841$CC foo.c -o foo.wasm
3942```
40- Note: ` [ WASI_SDK_PATH] /share/wasi-sysroot` contains the WASI-specific includes/libraries/etc. The ` --sysroot=... ` option
43+ Note: ` ${ WASI_SDK_PATH} /share/wasi-sysroot` contains the WASI-specific includes/libraries/etc. The ` --sysroot=... ` option
4144is not necessary if ` WASI_SDK_PATH ` is ` /opt/wasi-sdk ` .
4245
4346## Notes for Autoconf
You can’t perform that action at this time.
0 commit comments