]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/scripts/emscripten.sh
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / src / ci / docker / scripts / emscripten.sh
1 #!/bin/sh
2 set -ex
3
4 hide_output() {
5   set +x
6   on_err="
7 echo ERROR: An error was encountered with the build.
8 cat /tmp/build.log
9 exit 1
10 "
11   trap "$on_err" ERR
12   bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
13   PING_LOOP_PID=$!
14   "$@" &> /tmp/build.log
15   trap - ERR
16   kill $PING_LOOP_PID
17   rm -f /tmp/build.log
18   set -x
19 }
20
21 git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
22 cd /emsdk-portable
23 hide_output ./emsdk install 1.39.20
24 ./emsdk activate 1.39.20