Skip to content

Commit fc746c8

Browse files
committed
Update test-various docker image to test wasm32-wasip1
Drop testing of `wasm32-unknown-unknown` and instead only test a WASI target which enables more debugging utilities such as printing.
1 parent 341215c commit fc746c8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/ci/docker/host-x86_64/test-various/Dockerfile

+14-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM ubuntu:22.04
33
ARG DEBIAN_FRONTEND=noninteractive
44
RUN apt-get update && apt-get install -y --no-install-recommends \
55
clang-11 \
6+
llvm-11 \
67
g++ \
78
make \
89
ninja-build \
@@ -38,10 +39,14 @@ WORKDIR /
3839
COPY scripts/sccache.sh /scripts/
3940
RUN sh /scripts/sccache.sh
4041

42+
COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/
43+
RUN /tmp/build-wasi-toolchain.sh
44+
4145
ENV RUST_CONFIGURE_ARGS \
4246
--musl-root-x86_64=/usr/local/x86_64-linux-musl \
4347
--set build.nodejs=/node-v18.12.0-linux-x64/bin/node \
44-
--set rust.lld
48+
--set rust.lld \
49+
--set target.wasm32-wasip1.wasi-root=/wasm32-wasip1
4550

4651
# Some run-make tests have assertions about code size, and enabling debug
4752
# assertions in libstd causes the binary to be much bigger than it would
@@ -50,7 +55,11 @@ ENV RUST_CONFIGURE_ARGS \
5055
ENV NO_DEBUG_ASSERTIONS=1
5156
ENV NO_OVERFLOW_CHECKS=1
5257

53-
ENV WASM_TARGETS=wasm32-unknown-unknown
58+
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.2/wasmtime-v18.0.2-x86_64-linux.tar.xz | \
59+
tar -xJ
60+
ENV PATH "$PATH:/wasmtime-v18.0.2-x86_64-linux"
61+
62+
ENV WASM_TARGETS=wasm32-wasip1
5463
ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_TARGETS \
5564
tests/run-make \
5665
tests/ui \
@@ -59,7 +68,9 @@ ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_T
5968
tests/codegen \
6069
tests/assembly \
6170
library/core
62-
ENV CC_wasm32_unknown_unknown=clang-11
71+
ENV CC_wasm32_wasip1=clang-11 \
72+
CFLAGS_wasm32_wasip1="--sysroot /wasm32-wasip1" \
73+
AR_wasm32_wasip1=llvm-ar-11
6374

6475
ENV NVPTX_TARGETS=nvptx64-nvidia-cuda
6576
ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $NVPTX_TARGETS \

0 commit comments

Comments
 (0)