about summary refs log tree commit diff
path: root/src/ci/docker/scripts
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-08-16 22:08:01 -0700
committerThomas Lively <tlively@google.com>2019-10-04 00:47:21 -0700
commit9a55103b985fdd4a7d90db5d46ebaf0a9e34b419 (patch)
tree1cdfd7878ca16c941679737495dd08416c610956 /src/ci/docker/scripts
parent31d75c4e9c5318e880601d3c2cc71e5df094a120 (diff)
downloadrust-9a55103b985fdd4a7d90db5d46ebaf0a9e34b419.tar.gz
rust-9a55103b985fdd4a7d90db5d46ebaf0a9e34b419.zip
Upgrade Emscripten targets to use upstream LLVM backend
 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the incorrect wasm32 C call ABI with the old asmjs
   version, which is correct for both wasm32 and JS.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Temporarily makes Emscripten targets use panic=abort by default
   because supporting unwinding will require an LLVM patch.
Diffstat (limited to 'src/ci/docker/scripts')
-rw-r--r--src/ci/docker/scripts/emscripten-wasm.sh37
-rw-r--r--src/ci/docker/scripts/emscripten.sh11
2 files changed, 3 insertions, 45 deletions
diff --git a/src/ci/docker/scripts/emscripten-wasm.sh b/src/ci/docker/scripts/emscripten-wasm.sh
deleted file mode 100644
index e4a93d7a100..00000000000
--- a/src/ci/docker/scripts/emscripten-wasm.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-set -ex
-
-hide_output() {
-  set +x
-  on_err="
-echo ERROR: An error was encountered with the build.
-cat /tmp/build.log
-exit 1
-"
-  trap "$on_err" ERR
-  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
-  PING_LOOP_PID=$!
-  $@ &> /tmp/build.log
-  trap - ERR
-  kill $PING_LOOP_PID
-  rm -f /tmp/build.log
-  set -x
-}
-
-# Download last known good emscripten from WebAssembly waterfall
-BUILD=$(curl -fL https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | \
-    jq '.build | tonumber')
-curl -sL https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD/wasm-binaries.tbz2 | \
-    hide_output tar xvkj
-
-# node 8 is required to run wasm
-cd /
-curl -sL https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
-    tar -xJ
-
-# Make emscripten use wasm-ready node and LLVM tools
-echo "EMSCRIPTEN_ROOT = '/wasm-install/emscripten'" >> /root/.emscripten
-echo "NODE_JS='/usr/local/bin/node'" >> /root/.emscripten
-echo "LLVM_ROOT='/wasm-install/bin'" >> /root/.emscripten
-echo "BINARYEN_ROOT = '/wasm-install'" >> /root/.emscripten
-echo "COMPILER_ENGINE = NODE_JS" >> /root/.emscripten
-echo "JS_ENGINES = [NODE_JS]" >> /root/.emscripten
diff --git a/src/ci/docker/scripts/emscripten.sh b/src/ci/docker/scripts/emscripten.sh
index 47196e89396..9c7a09e227a 100644
--- a/src/ci/docker/scripts/emscripten.sh
+++ b/src/ci/docker/scripts/emscripten.sh
@@ -17,20 +17,15 @@ exit 1
   set -x
 }
 
-cd /
-curl -fL https://mozilla-games.s3.amazonaws.com/emscripten/releases/emsdk-portable.tar.gz | \
-    tar -xz
-
+git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
 cd /emsdk-portable
-./emsdk update
-hide_output ./emsdk install sdk-1.38.15-64bit
-./emsdk activate sdk-1.38.15-64bit
+hide_output ./emsdk install 1.38.46-upstream
+./emsdk activate 1.38.46-upstream
 
 # Compile and cache libc
 source ./emsdk_env.sh
 echo "main(){}" > a.c
 HOME=/emsdk-portable/ emcc a.c
-HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
 rm -f a.*
 
 # Make emsdk usable by any user