Update WASI-tutorial.md
This commit is contained in:
committed by
Dan Gohman
parent
ce8912abf3
commit
15b85dc285
@@ -77,9 +77,11 @@ which is configured to target WASI and use the WASI sysroot by default, so we ca
|
|||||||
compile our program like so:
|
compile our program like so:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ clang demo.c -o demo.wasm
|
$ clang demo.c --sysroot <path to sysroot> -o demo.wasm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The sysroot is folder is located in `opt/wasi-sdk/share/sysroot/`.
|
||||||
|
|
||||||
A few things to note here. First, this is just regular clang, configured to use
|
A few things to note here. First, this is just regular clang, configured to use
|
||||||
a WebAssembly target and sysroot. Second, the output name specified with the "-o"
|
a WebAssembly target and sysroot. Second, the output name specified with the "-o"
|
||||||
flag can be anything you want, and *does not* need to contain the `.wasm` extension.
|
flag can be anything you want, and *does not* need to contain the `.wasm` extension.
|
||||||
|
|||||||
Reference in New Issue
Block a user