diff --git a/.travis.yml b/.travis.yml index 7175ae4aad8361c8b7c65d3bb8bcfcbe2f9e1783..ad8df0763713e3093d55556bd004ac7ca342b49d 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 a943e3782334eb1fdb0dd3e5b5f281754326cf41..0000000000000000000000000000000000000000 --- 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 8c6e2f3756c5ab9618cecbca479bd060f618e57e..d963a442c86bb0325ab901bf59804baf24aabaec 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 0000000000000000000000000000000000000000..6f298128ab8c342a6dc301622b8020aef12c26ee --- /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 "$@"