From 3ac67ebcf7289b6088db35dd1c508a3afe25dcfc Mon Sep 17 00:00:00 2001
From: gnzlbg <gonzalobg88@gmail.com>
Date: Thu, 16 May 2019 09:25:10 +0200
Subject: [PATCH] Rename wasm32-unknown-wasi to wasm32-wasi

---
 .travis.yml                                   |  2 +-
 ci/docker/wasm32-unknown-wasi/clang.sh        |  2 --
 .../Dockerfile                                | 20 +++++++++----------
 ci/docker/wasm32-wasi/clang.sh                |  2 ++
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100755 ci/docker/wasm32-unknown-wasi/clang.sh
 rename ci/docker/{wasm32-unknown-wasi => wasm32-wasi}/Dockerfile (85%)
 create mode 100755 ci/docker/wasm32-wasi/clang.sh

diff --git a/.travis.yml b/.travis.yml
index 7175ae4a..ad8df076 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -204,7 +204,7 @@ matrix:
       stage: tier2
     - env: TARGET=x86_64-unknown-linux-musl
       stage: tier2
-    - env: TARGET=wasm32-unknown-wasi
+    - env: TARGET=wasm32-wasi
       rust: nightly
       stage: tier2
 
diff --git a/ci/docker/wasm32-unknown-wasi/clang.sh b/ci/docker/wasm32-unknown-wasi/clang.sh
deleted file mode 100755
index a943e378..00000000
--- a/ci/docker/wasm32-unknown-wasi/clang.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-exec /wasmcc/bin/clang --target=wasm32-unknown-wasi --sysroot /wasi-sysroot "$@"
diff --git a/ci/docker/wasm32-unknown-wasi/Dockerfile b/ci/docker/wasm32-wasi/Dockerfile
similarity index 85%
rename from ci/docker/wasm32-unknown-wasi/Dockerfile
rename to ci/docker/wasm32-wasi/Dockerfile
index 8c6e2f37..d963a442 100644
--- a/ci/docker/wasm32-unknown-wasi/Dockerfile
+++ b/ci/docker/wasm32-wasi/Dockerfile
@@ -1,7 +1,7 @@
 # In the first container we want to assemble the `wasi-sysroot` by compiling it
 # from source. This requires a clang 8.0+ compiler with enough wasm support and
 # then we're just running a standard `make` inside of what we clone.
-FROM ubuntu:19.04 as wasi-sysroot
+FROM ubuntu:18.04 as wasi-sysroot
 
 RUN apt-get update && \
     apt-get install -y --no-install-recommends \
@@ -28,19 +28,19 @@ RUN mv /clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04 /wasmcc
 # those breaking changes on `libc`'s own CI
 RUN git clone https://github.com/CraneStation/wasi-sysroot && \
   cd wasi-sysroot && \
-  git reset --hard 2201343c17b7149a75f543f523bea0c3243c6091
+  git reset --hard eee6ee7566e26f2535eb6088c8494a112ff423b9
 RUN make -C wasi-sysroot install -j $(nproc) WASM_CC=/wasmcc/bin/clang INSTALL_DIR=/wasi-sysroot
 
 # This is a small wrapper script which executes the actual clang binary in
 # `/wasmcc` and then is sure to pass the right `--sysroot` argument which we
 # just built above.
-COPY docker/wasm32-unknown-wasi/clang.sh /wasi-sysroot/bin/clang
+COPY docker/wasm32-wasi/clang.sh /wasi-sysroot/bin/clang
 
 # In the second container we're going to build the `wasmtime` binary which is
 # used to execute wasi executables. This is a standard Rust project so we're
 # just checking out a known revision (which pairs with the sysroot one we
 # downlaoded above) and then we're building it with Cargo
-FROM ubuntu:19.04 as wasmtime
+FROM ubuntu:18.04 as wasmtime
 
 RUN apt-get update && \
     apt-get install -y --no-install-recommends \
@@ -58,15 +58,15 @@ RUN curl -sSf https://sh.rustup.rs |  sh -s -- -y
 ENV PATH=/root/.cargo/bin:$PATH
 
 RUN apt-get install -y --no-install-recommends python
-RUN git clone https://github.com/CraneStation/wasmtime wasmtime && \
+RUN git clone --recursive https://github.com/CraneStation/wasmtime wasmtime && \
   cd wasmtime && \
-  git reset --hard a1c123c3dd8f9766990efe0f1734a646f61ba8a0
+  git reset --hard 67edb00f29b62864b00179fe4bfa99bc29973285
 RUN cargo build --release --manifest-path wasmtime/Cargo.toml
 
 # And finally in the last image we're going to assemble everything together.
 # We'll install things needed at runtime for now and then copy over the
 # sysroot/wasmtime artifacts into their final location.
-FROM ubuntu:19.04
+FROM ubuntu:18.04
 
 RUN apt-get update && \
     apt-get install -y --no-install-recommends \
@@ -86,8 +86,8 @@ COPY --from=wasmtime /wasmtime/target/release/wasmtime /usr/bin/
 # executable with the right sysroot, and then we're sure to turn off the
 # crt-static feature to ensure that the CRT that we're specifying with `clang`
 # is used.
-ENV CARGO_TARGET_WASM32_UNKNOWN_WASI_RUNNER=wasmtime \
-  CARGO_TARGET_WASM32_UNKNOWN_WASI_LINKER=/wasi-sysroot/bin/clang \
-  CC_wasm32_unknown_wasi=/wasi-sysroot/bin/clang \
+ENV CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime \
+  CARGO_TARGET_WASM32_WASI_LINKER=/wasi-sysroot/bin/clang \
+  CC_wasm32_wasi=/wasi-sysroot/bin/clang \
   PATH=$PATH:/rust/bin \
   RUSTFLAGS=-Ctarget-feature=-crt-static
diff --git a/ci/docker/wasm32-wasi/clang.sh b/ci/docker/wasm32-wasi/clang.sh
new file mode 100755
index 00000000..6f298128
--- /dev/null
+++ b/ci/docker/wasm32-wasi/clang.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env sh
+exec /wasmcc/bin/clang --target=wasm32-wasi --sysroot /wasi-sysroot "$@"
-- 
GitLab