skia2/infra/wasm-common/docker/emsdk-base/Dockerfile
Kevin Lubick d1285b131b Upgrade CanvasKit emscripten to version 1.39.16.
Changes are largely mechanical.  Non-mechanical changes to support newer
versions of emscripten are enumerated below, in format ${EMSCRIPTEN_VERSION}:
${RELEVANT_CHANGE}.

- 1.39.9: TOTAL_MEMORY has been renamed INITIAL_MEMORY.
- 1.39.12: passing of linker flags to wasm-ld has changed in a way that requires
  supplying `--no-entry` to avoid error message "wasm-ld: error: entry symbol
  not defined (pass --no-entry to suppress): main".
- 1.39.16: The factory function created by using `MODULARIZE` build option now
  returns a Promise instead of the module instance.  As such, the ready.js
  workaround is removed.  Note this is a breaking API change for CanvasKit,
  which now uses just `then()` and not `ready().then()`.
- 1.38.33: `emsdk install` hasn't required the `-64bit` suffix on version names
  since `1.38.33`, so we remove them.  E.g. `emsdk install sdk-1.39.6-64bit`
  simply becomes `emsdk install sdk-1.39.16`.

cf. https://github.com/emscripten-core/emscripten/blob/master/ChangeLog.md

Bug: NONE
Change-Id: Iabec4bd5ad7db2e0715ad42c2e4cf7d67b192b4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291182
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-05-21 14:18:48 +00:00

29 lines
728 B
Docker

# A Docker image that has the Emscripten SDK installed to /opt/emsdk
# Use this image to compile C/C++ code to WASM.
# It has the Java Runtime to allow the use of the Closure JS compiler/minifier.
# TODO(kjlubick): add an ARG to make it easier to pass in the version number.
FROM gcr.io/skia-public/skia-build-tools:latest
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
nodejs \
default-jre
# TODO(kjlubick): Try a shallow clone
RUN cd /opt \
&& git clone https://github.com/emscripten-core/emsdk.git
WORKDIR /opt/emsdk
RUN ./emsdk update-tags
RUN ./emsdk install sdk-1.39.16
RUN ./emsdk activate sdk-1.39.16
RUN /bin/bash -c "source ./emsdk_env.sh"
ENV EMSDK=/opt/emsdk
RUN mkdir -p /OUT /SRC