From f647f8991b678948673338b6a0f6b28f1ec439ed Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 9 Mar 2016 18:46:16 -0500 Subject: [PATCH] browser-asmjs: Update Emscripten to 1.36.1. Only a 32-bit sdk tag is available from emsdk. --- browser-asmjs/Dockerfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/browser-asmjs/Dockerfile b/browser-asmjs/Dockerfile index 0199ee0..a082ac0 100644 --- a/browser-asmjs/Dockerfile +++ b/browser-asmjs/Dockerfile @@ -8,17 +8,32 @@ RUN curl -sL https://deb.nodesource.com/setup | bash - && \ nodejs \ python2.7 -ENV EMSCRIPTEN_VERSION 1.35.4 +ENV EMSCRIPTEN_VERSION 1.36.1 RUN cd /usr && \ curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | tar xz && \ cd ./emsdk_portable && \ ./emsdk update && \ - ./emsdk install -j$(nproc) --build=Release sdk-tag-${EMSCRIPTEN_VERSION}-64bit && \ - ./emsdk activate --build=Release sdk-tag-${EMSCRIPTEN_VERSION}-64bit && \ + ./emsdk install -j$(nproc) --build=Release sdk-tag-${EMSCRIPTEN_VERSION}-32bit && \ + ./emsdk activate --build=Release sdk-tag-${EMSCRIPTEN_VERSION}-32bit && \ + ./emsdk install node-4.1.1-64bit && \ + ./emsdk activate node-4.1.1-64bit && \ + ./emsdk uninstall node-4.1.1-32bit && \ find . -name "*.o" -exec rm {} \; && \ find . -name "*.a" -exec rm {} \; && \ find . -name "*.tmp" -exec rm {} \; -ENV PATH /usr/emsdk_portable:/usr/emsdk_portable/clang/tag-e${EMSCRIPTEN_VERSION}/build_tag-e${EMSCRIPTEN_VERSION}_64/bin:/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}:${PATH} +ENV PATH /usr/emsdk_portable:/usr/emsdk_portable/clang/tag-e${EMSCRIPTEN_VERSION}/build_tag-e${EMSCRIPTEN_VERSION}_32/bin:/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}:${PATH} +ENV CC=/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/emcc \ + CXX=/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/em++ \ + AR=/usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/emar + +# Emscripten generates system libraries the firsts time it runs +RUN cd /tmp && \ + /bin/echo -e "#include \nint main() { std::cout << \"first run\"; return 0; }" > /tmp/first_run.cxx && \ + $CXX /tmp/first_run.cxx && \ + rm /tmp/first_run.* && \ + /bin/echo -e "#include \nint main() { printf(\"first run\"); return 0; }" > /tmp/first_run.c && \ + $CC /tmp/first_run.c && \ + rm /tmp/first_run.* a.out.js ENV CMAKE_TOOLCHAIN_FILE /usr/emsdk_portable/emscripten/tag-${EMSCRIPTEN_VERSION}/cmake/Modules/Platform/Emscripten.cmake