diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5810156 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +tmp/ diff --git a/Dockerfile b/Dockerfile index 467777f..a9de57b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,13 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.30.4/cmake-3.30.4 bash cmake_install.sh --prefix=cmake --skip-license && \ rm cmake_install.sh +# Prebuilding system libraries so that we don't have to do it again in each use case. +RUN mkdir tmp && \ + touch tmp/foo.c && \ + cd tmp && \ + emcc --use-port=zlib -pthread --bind foo.c -o alpha \ + emcc --use-port=zlib -pthread --bind -O3 foo.c -o bravo \ + cd ../ && \ + rm -rf tmp + ENV PATH="/emsdk:/emsdk/upstream/emscripten:/cmake/bin:${PATH}"