Skip to content

Commit

Permalink
Update emscripten docker image to be based on emscripten 2.0.12 and b…
Browse files Browse the repository at this point in the history
…oost 1.75.0.
  • Loading branch information
ekpyron committed Jan 12, 2021
1 parent e9dcd4f commit d0c8c79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 10 additions & 11 deletions scripts/docker/buildpack-deps/Dockerfile.emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
# contains a Makefile in the docker/ subdirectory that can be used to create the
# required base image using:
#
# make version=1.39.15 build
# make version=2.0.12 build
#
FROM emscripten/emsdk:1.39.15 AS base
LABEL version="2"
FROM emscripten/emsdk:2.0.12 AS base
LABEL version="3"

ADD emscripten.jam /usr/src
RUN set -ex; \
Expand All @@ -40,28 +40,27 @@ RUN set -ex; \
cd build; \
emcmake cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/emsdk/emscripten/sdk/system/ \
-DCMAKE_INSTALL_PREFIX=/emsdk/upstream/emscripten/system \
-DZ3_BUILD_LIBZ3_SHARED=OFF \
-DZ3_ENABLE_EXAMPLE_TARGETS=OFF \
-DZ3_BUILD_TEST_EXECUTABLES=OFF \
-DZ3_BUILD_EXECUTABLE=OFF \
-DZ3_SINGLE_THREADED=ON \
-DCMAKE_CXX_FLAGS="-s DISABLE_EXCEPTION_CATCHING=0" \
..; \
make; make install; \
make ; make install; \
rm -r /usr/src/z3; \
cd /usr/src; \
wget -q 'https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2' -O boost.tar.bz2; \
test "$(sha256sum boost.tar.bz2)" = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 boost.tar.bz2"; \
wget -q 'https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2' -O boost.tar.bz2; \
test "$(sha256sum boost.tar.bz2)" = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb boost.tar.bz2"; \
tar -xf boost.tar.bz2; \
rm boost.tar.bz2; \
cd boost_1_73_0; \
cd boost_1_75_0; \
mv ../emscripten.jam .; \
./bootstrap.sh; \
echo "using emscripten : : em++ ;" >> project-config.jam ; \
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
--with-system --with-filesystem --with-test --with-program_options \
cxxflags="-s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
--prefix=/emsdk/emscripten/sdk/system install; \
rm -r /usr/src/boost_1_73_0

--prefix=/emsdk/upstream/emscripten/system install; \
rm -r /usr/src/boost_1_75_0
8 changes: 4 additions & 4 deletions scripts/docker/buildpack-deps/emscripten.jam
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ rule init ( version ? : command * : options * )
# @todo this seems to be the right way, but this is a list somehow
toolset.add-requirements <toolset>emscripten:<testing.launcher>node ;

toolset.flags emscripten.compile STDHDRS $(condition) : /emsdk/emscripten/sdk/system/include ;
toolset.flags emscripten.link STDLIBPATH $(condition) : /emsdk/emscripten/sdk/system/lib ;
toolset.flags emscripten AR $(condition) : /emsdk/emscripten/sdk/emar ;
toolset.flags emscripten RANLIB $(condition) : /emsdk/emscripten/sdk/emranlib ;
toolset.flags emscripten.compile STDHDRS $(condition) : /emsdk/upstream/emscripten/system/include ;
toolset.flags emscripten.link STDLIBPATH $(condition) : /emsdk/upstream/emscripten/system/lib ;
toolset.flags emscripten AR $(condition) : /emsdk/upstream/emscripten/emar ;
toolset.flags emscripten RANLIB $(condition) : /emsdk/upstream/emscripten/emranlib ;
}

type.set-generated-target-suffix EXE : <toolset>emscripten : js ;
Expand Down

0 comments on commit d0c8c79

Please sign in to comment.