Use emscripten 1.38.8 on both travis and circle.

This commit is contained in:
Daniel Kirchner 2018-07-11 17:15:03 +02:00
parent 6de10cb9da
commit 5baac8470b
7 changed files with 16 additions and 7 deletions

View File

@ -34,7 +34,7 @@ version: 2
jobs: jobs:
build_emscripten: build_emscripten:
docker: docker:
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit - image: trzeci/emscripten:sdk-tag-1.38.8-64bit
environment: environment:
TERM: xterm TERM: xterm
steps: steps:

View File

@ -114,7 +114,7 @@ matrix:
before_install: before_install:
- nvm install 8 - nvm install 8
- nvm use 8 - nvm use 8
- docker pull trzeci/emscripten:sdk-tag-1.37.21-64bit - docker pull trzeci/emscripten:sdk-tag-1.38.8-64bit
env: env:
- SOLC_EMSCRIPTEN=On - SOLC_EMSCRIPTEN=On
- SOLC_INSTALL_DEPS_TRAVIS=Off - SOLC_INSTALL_DEPS_TRAVIS=Off

View File

@ -14,6 +14,7 @@ Bugfixes:
Build System: Build System:
* Emscripten: Upgrade to emscripten 1.38.8 on travis and circleci.
### 0.5.2 (2018-12-19) ### 0.5.2 (2018-12-19)

View File

@ -100,6 +100,11 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
# Disallow deprecated emscripten build options. # Disallow deprecated emscripten build options.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s STRICT=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s STRICT=1")
# Export the Emscripten-generated auxiliary methods which are needed by solc-js.
# Which methods of libsolc itself are exported is specified in libsolc/CMakeLists.txt.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','addFunction','removeFunction','Pointer_stringify','lengthBytesUTF8','_malloc','stringToUTF8','setValue']")
# Do not build as a WebAssembly target - we need an asm.js output.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=0")
endif() endif()
endif() endif()

View File

@ -1,4 +1,7 @@
if (EMSCRIPTEN) if (EMSCRIPTEN)
# Specify which functions to export in soljson.js.
# Note that additional Emscripten-generated methods needed by solc-js are
# defined to be exported in cmake/EthCompilerSettings.cmake.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_solidity_license\",\"_solidity_version\",\"_solidity_compile\"]' -s RESERVED_FUNCTION_POINTERS=20") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_solidity_license\",\"_solidity_version\",\"_solidity_compile\"]' -s RESERVED_FUNCTION_POINTERS=20")
add_executable(soljson libsolc.cpp libsolc.h) add_executable(soljson libsolc.cpp libsolc.h)
target_link_libraries(soljson PRIVATE solidity) target_link_libraries(soljson PRIVATE solidity)

View File

@ -30,5 +30,5 @@ set -e
if [[ "$OSTYPE" != "darwin"* ]]; then if [[ "$OSTYPE" != "darwin"* ]]; then
./scripts/travis-emscripten/install_deps.sh ./scripts/travis-emscripten/install_deps.sh
docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.37.21-64bit ./scripts/travis-emscripten/build_emscripten.sh docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.38.8-64bit ./scripts/travis-emscripten/build_emscripten.sh
fi fi

View File

@ -49,11 +49,11 @@ fi
WORKSPACE=/root/project WORKSPACE=/root/project
# Increase nodejs stack size # Increase nodejs stack size
if [ -e ~/.emscripten ] if ! [ -e /emsdk_portable/node/bin/node_orig ]
then then
sed -i -e 's/NODE_JS="nodejs"/NODE_JS=["nodejs", "--stack_size=8192"]/' ~/.emscripten mv /emsdk_portable/node/bin/node /emsdk_portable/node/bin/node_orig
else echo -e '#!/bin/sh\nexec /emsdk_portable/node/bin/node_orig --stack-size=8192 $@' > /emsdk_portable/node/bin/node
echo 'NODE_JS=["nodejs", "--stack_size=8192"]' > ~/.emscripten chmod 755 /emsdk_portable/node/bin/node
fi fi
# Boost # Boost