3 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
18 COPY scripts/emscripten.sh /scripts/
19 RUN bash /scripts/emscripten.sh
21 COPY scripts/sccache.sh /scripts/
22 RUN sh /scripts/sccache.sh
24 # emcc seems to need python to specifically be "python" and not "python3"
25 RUN ln `which python3` /usr/bin/python
27 ENV PATH=$PATH:/emsdk-portable
28 ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
30 # Rust's build system requires NodeJS to be in the path, but the directory in
31 # which emsdk stores it contains the version number. This caused breakages in
32 # the past when emsdk bumped the node version causing the path to point to a
35 # To avoid the problem this symlinks the latest NodeJs version available to
36 # "latest", and adds that to the path.
37 RUN ln -s /emsdk-portable/node/$(ls /emsdk-portable/node | sort -V | tail -n 1) \
38 /emsdk-portable/node/latest
39 ENV PATH=$PATH:/emsdk-portable/node/latest/bin/
41 ENV BINARYEN_ROOT=/emsdk-portable/upstream/
42 ENV EMSDK=/emsdk-portable
43 ENV EM_CONFIG=/emsdk-portable/.emscripten
44 ENV EM_CACHE=/emsdk-portable/upstream/emscripten/cache
46 ENV TARGETS=wasm32-unknown-emscripten
48 # Use -O1 optimizations in the link step to reduce time spent optimizing.
51 # Emscripten installation is user-specific
54 # Exclude library/alloc due to OOM in benches.
55 ENV SCRIPT python3 ../x.py test --stage 2 --host='' --target $TARGETS \
56 --exclude library/alloc