3 RUN apt-get update && apt-get install -y --no-install-recommends \
17 COPY scripts/emscripten.sh /scripts/
18 RUN bash /scripts/emscripten.sh
20 COPY scripts/sccache.sh /scripts/
21 RUN sh /scripts/sccache.sh
23 # emcc seems to need python to specifically be "python" and not "python3"
24 RUN ln `which python3` /usr/bin/python
26 ENV PATH=$PATH:/emsdk-portable
27 ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
29 # Rust's build system requires NodeJS to be in the path, but the directory in
30 # which emsdk stores it contains the version number. This caused breakages in
31 # the past when emsdk bumped the node version causing the path to point to a
34 # To avoid the problem this symlinks the latest NodeJs version available to
35 # "latest", and adds that to the path.
36 RUN ln -s /emsdk-portable/node/$(ls /emsdk-portable/node | sort -V | tail -n 1) \
37 /emsdk-portable/node/latest
38 ENV PATH=$PATH:/emsdk-portable/node/latest/bin/
40 ENV BINARYEN_ROOT=/emsdk-portable/upstream/
41 ENV EMSDK=/emsdk-portable
42 ENV EM_CONFIG=/emsdk-portable/.emscripten
43 ENV EM_CACHE=/emsdk-portable/upstream/emscripten/cache
45 ENV TARGETS=wasm32-unknown-emscripten
47 # Use -O1 optimizations in the link step to reduce time spent optimizing.
50 # Emscripten installation is user-specific
53 # FIXME: Re-enable these tests once https://github.com/rust-lang/cargo/pull/7476
55 ENV SCRIPT python3 ../x.py test --stage 2 --target $TARGETS \
56 --exclude library/core \
57 --exclude library/alloc \
58 --exclude library/proc_macro \
59 --exclude library/std \
60 --exclude library/term \
61 --exclude library/test