Merge pull request #12241 from ethereum/emscriptenUpdate

Update emscripten Dockerfile.
This commit is contained in:
Daniel Kirchner 2021-11-05 10:07:40 +01:00 committed by GitHub
commit d6cb42c9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,10 +26,14 @@
# contains a Makefile in the docker/ subdirectory that can be used to create the # contains a Makefile in the docker/ subdirectory that can be used to create the
# required base image using: # required base image using:
# #
# make version=2.0.12 build # make version=2.0.33 build
# #
FROM emscripten/emsdk:2.0.12 AS base # Note that emscripten is supposed to automatically install to $(em-config CACHE)/sysroot, but
LABEL version="6" # apparently this currently breaks due to conflicting compatibility headers.
# Using $(em-config CACHE)/sysroot/usr seems to work, though, and still has cmake find the
# dependencies automatically.
FROM emscripten/emsdk:2.0.33 AS base
LABEL version="7"
ADD emscripten.jam /usr/src ADD emscripten.jam /usr/src
RUN set -ex; \ RUN set -ex; \
@ -39,8 +43,8 @@ RUN set -ex; \
mkdir build; \ mkdir build; \
cd build; \ cd build; \
emcmake cmake \ emcmake cmake \
-DCMAKE_INSTALL_PREFIX=$(em-config CACHE)/sysroot/usr \
-DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/emsdk/upstream/emscripten/system \
-DZ3_BUILD_LIBZ3_SHARED=OFF \ -DZ3_BUILD_LIBZ3_SHARED=OFF \
-DZ3_ENABLE_EXAMPLE_TARGETS=OFF \ -DZ3_ENABLE_EXAMPLE_TARGETS=OFF \
-DZ3_BUILD_TEST_EXECUTABLES=OFF \ -DZ3_BUILD_TEST_EXECUTABLES=OFF \
@ -63,5 +67,5 @@ RUN set -ex; \
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \ ./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
--with-system --with-filesystem --with-test --with-program_options \ --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" \ cxxflags="-s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
--prefix=/emsdk/upstream/emscripten/system install; \ --prefix=$(em-config CACHE)/sysroot/usr install; \
rm -r /usr/src/boost_1_75_0 rm -r /usr/src/boost_1_75_0