-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile-emscripten
More file actions
35 lines (32 loc) · 1.43 KB
/
Dockerfile-emscripten
File metadata and controls
35 lines (32 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM ricejasonf/cppdock:linux_x64 AS base_image
RUN apt-get update -yq && apt-get install -yq nodejs npm
FROM base_image AS build_binaryen
WORKDIR /opt/src
RUN git clone --depth=1 --branch version_125 \
https://github.com/WebAssembly/binaryen.git
WORKDIR /opt/build
RUN cmake -DCMAKE_TOOLCHAIN_FILE=/opt/cppdock/toolchains/linux_x64.cmake \
-DBUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/install \
/opt/src/binaryen && \
make -j$(nproc) && make install
FROM base_image AS build_emscripten
WORKDIR /opt/src
RUN git clone --depth=1 --branch 4.0.20 \
https://github.com/emscripten-core/emscripten
WORKDIR /opt/src/emscripten
RUN ./tools/maint/create_entry_points.py && \
./tools/install.py /opt/install/emscripten
FROM base_image
COPY cppdock /usr/local/bin/
COPY recipes/ /opt/cppdock/recipes
COPY toolchains/ /opt/cppdock/toolchains
COPY --from=build_binaryen /opt/install/ /usr/local
COPY --from=build_emscripten /opt/install/ /usr/local
WORKDIR /usr/local/emscripten
RUN ./emcc --generate-config && ./emcc --check && ./embuilder.py build MINIMAL
# Copy heavy-scheme libraries
COPY --from=base_image /opt/sysroot/include/heavy/*.sld ./cache/sysroot/include/heavy/
COPY --from=base_image /opt/sysroot/include/heavy/base/*.sld ./cache/sysroot/include/heavy/base/
RUN ln -snf /usr/local/emscripten/cache/sysroot/ /opt/sysroot
ENV EMSCRIPTEN_ROOT=/usr/local/emscripten