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
26
26
27
27
A typical installation from the release binaries might look like the following:
28
28
``` 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
31
33
```
32
34
33
35
## Use
34
36
35
37
Use the clang installed in the wasi-sdk directory:
36
38
``` 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"
38
41
$CC foo.c -o foo.wasm
39
42
```
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
41
44
is not necessary if ` WASI_SDK_PATH ` is ` /opt/wasi-sdk ` .
42
45
43
46
## Notes for Autoconf
You can’t perform that action at this time.
0 commit comments