]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
e9e4a893476a9f4e12cf012359e8b2acce7b11f7
[rust.git] / src / ci / docker / host-x86_64 / dist-various-2 / build-wasi-toolchain.sh
1 #!/bin/sh
2 #
3 # ignore-tidy-linelength
4
5 set -ex
6
7 # Originally from https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
8 curl https://ci-mirrors.rust-lang.org/rustc/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \
9   tar xJf -
10 export PATH=`pwd`/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
11
12 git clone https://github.com/WebAssembly/wasi-libc
13
14 cd wasi-libc
15 git reset --hard 215adc8ac9f91eb055311acc72683fd2eb1ae15a
16 make -j$(nproc) INSTALL_DIR=/wasm32-wasi install
17
18 cd ..
19 rm -rf wasi-libc
20 rm -rf clang+llvm*