diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2023-09-12 17:16:04 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2023-09-12 17:16:04 +0100 |
commit | 44442b8c85399e4baa49c28a436ce0c3aeb5deb1 (patch) | |
tree | 48ca3133098207c672ad4ccf9b1f2516c192db2c | |
parent | ef3227529fef94f74b8863f212b6b02a82c5f686 (diff) | |
download | unit-wasm-44442b8c85399e4baa49c28a436ce0c3aeb5deb1.tar.gz unit-wasm-44442b8c85399e4baa49c28a436ce0c3aeb5deb1.tar.bz2 |
HOWTO.md: A couple of minor updates
Change the minimum clang/llvm version to 9.0 (as noted here[0]).
Provide an alternate command for installing the libclang wasm runtime
library.
[0]: https://github.com/WebAssembly/wasi-sdk/blob/main/README.md?plain=1#L19
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r-- | HOWTO.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -78,7 +78,7 @@ wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/w ``` Next Compile the C demo Wasm Modules to `.wasm` files. This requires at least -the following; make and clang, llvm, compiler-rt, and lld from LLVM 8.0+ +the following; make and clang, llvm, compiler-rt, and lld from LLVM 9.0+ ```shell $ cd unit-wasm @@ -108,6 +108,13 @@ Adjust the tar '-C ...' option accordingly below... wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz | sudo tar -xvzf - -C /usr/lib/llvm-11/lib/clang/11.0.1 ``` +With recent enough versions of Clang (that support the -print-runtime-dir +option) you can use the following command (as root) + +```shell +wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz | tar --strip-components=1 -xvzf - -C $(dirname $(clang -print-runtime-dir)) +``` + Then try again... If everything built OK then you should have the following two WASM modules |