diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2019-01-18 02:42:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 02:42:00 +0800 |
commit | 7c07e9498664c9b9dec6f332490d51c7a920de8b (patch) | |
tree | 621c5d6dce7084740c03f1ad78fcd991f14b61a9 | |
parent | 6de10cb9da3a81befb050ba9b883bfd4b0524cf6 (diff) | |
parent | 5baac8470be4b82d53939e260d40f38d2fc15e6e (diff) | |
download | dexon-solidity-7c07e9498664c9b9dec6f332490d51c7a920de8b.tar.gz dexon-solidity-7c07e9498664c9b9dec6f332490d51c7a920de8b.tar.zst dexon-solidity-7c07e9498664c9b9dec6f332490d51c7a920de8b.zip |
Merge pull request #4441 from ethereum/emscriptenBoostTest
Update emscripten version to 1.38.8.
-rw-r--r-- | .circleci/config.yml | 2 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | cmake/EthCompilerSettings.cmake | 5 | ||||
-rw-r--r-- | libsolc/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | scripts/build_emscripten.sh | 2 | ||||
-rwxr-xr-x | scripts/travis-emscripten/build_emscripten.sh | 8 |
7 files changed, 16 insertions, 7 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 66fe6430..52bb36cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ version: 2 jobs: build_emscripten: docker: - - image: trzeci/emscripten:sdk-tag-1.37.21-64bit + - image: trzeci/emscripten:sdk-tag-1.38.8-64bit environment: TERM: xterm steps: diff --git a/.travis.yml b/.travis.yml index 2036f03e..a8a68aff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,7 +114,7 @@ matrix: before_install: - nvm install 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: - SOLC_EMSCRIPTEN=On - SOLC_INSTALL_DEPS_TRAVIS=Off diff --git a/Changelog.md b/Changelog.md index 7668daa6..79ec90a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,6 +14,7 @@ Bugfixes: Build System: + * Emscripten: Upgrade to emscripten 1.38.8 on travis and circleci. ### 0.5.2 (2018-12-19) diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 8ffdfeb0..d05ccaff 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -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") # Disallow deprecated emscripten build options. 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() diff --git a/libsolc/CMakeLists.txt b/libsolc/CMakeLists.txt index dfdf8162..7fb4aa05 100644 --- a/libsolc/CMakeLists.txt +++ b/libsolc/CMakeLists.txt @@ -1,4 +1,7 @@ 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") add_executable(soljson libsolc.cpp libsolc.h) target_link_libraries(soljson PRIVATE solidity) diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh index 14c497ae..46521cc5 100755 --- a/scripts/build_emscripten.sh +++ b/scripts/build_emscripten.sh @@ -30,5 +30,5 @@ set -e if [[ "$OSTYPE" != "darwin"* ]]; then ./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 diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh index 32677460..373f32db 100755 --- a/scripts/travis-emscripten/build_emscripten.sh +++ b/scripts/travis-emscripten/build_emscripten.sh @@ -49,11 +49,11 @@ fi WORKSPACE=/root/project # Increase nodejs stack size -if [ -e ~/.emscripten ] +if ! [ -e /emsdk_portable/node/bin/node_orig ] then - sed -i -e 's/NODE_JS="nodejs"/NODE_JS=["nodejs", "--stack_size=8192"]/' ~/.emscripten -else - echo 'NODE_JS=["nodejs", "--stack_size=8192"]' > ~/.emscripten + mv /emsdk_portable/node/bin/node /emsdk_portable/node/bin/node_orig + echo -e '#!/bin/sh\nexec /emsdk_portable/node/bin/node_orig --stack-size=8192 $@' > /emsdk_portable/node/bin/node + chmod 755 /emsdk_portable/node/bin/node fi # Boost |