aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/travis-emscripten/build_emscripten.sh
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-22 20:49:41 +0800
committerGitHub <noreply@github.com>2019-01-22 20:49:41 +0800
commit10d17f245839f208ec5085309022a32cd2502f55 (patch)
treeb2c9f68980d0d418cd6f511e9f3f3f71369abe25 /scripts/travis-emscripten/build_emscripten.sh
parent1df8f40cd2fd7b47698d847907b8ca7b47eb488d (diff)
parent0ecafe032a84cb6960545dd7f18733430c1f782d (diff)
downloaddexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.gz
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.bz2
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.lz
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.xz
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.zst
dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.zip
Merge pull request #5836 from ethereum/develop
Merge develop into release for 0.5.3.
Diffstat (limited to 'scripts/travis-emscripten/build_emscripten.sh')
-rwxr-xr-xscripts/travis-emscripten/build_emscripten.sh27
1 files changed, 14 insertions, 13 deletions
diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh
index 32899903..0b6c5346 100755
--- a/scripts/travis-emscripten/build_emscripten.sh
+++ b/scripts/travis-emscripten/build_emscripten.sh
@@ -49,16 +49,16 @@ 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
echo -en 'travis_fold:start:compiling_boost\\r'
-cd "$WORKSPACE"/boost_1_67_0
+cd "$WORKSPACE"/boost_1_68_0
# if b2 exists, it is a fresh checkout, otherwise it comes from the cache
# and is already compiled
test -e b2 && (
@@ -79,24 +79,25 @@ cd $WORKSPACE
mkdir -p build
cd build
cmake \
- -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake \
+ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/emscripten.cmake \
-DCMAKE_BUILD_TYPE=Release \
- -DEMSCRIPTEN=1 \
-DBoost_FOUND=1 \
-DBoost_USE_STATIC_LIBS=1 \
-DBoost_USE_STATIC_RUNTIME=1 \
- -DBoost_INCLUDE_DIR="$WORKSPACE"/boost_1_67_0/ \
- -DBoost_FILESYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_filesystem.a \
- -DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_program_options.a \
- -DBoost_REGEX_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_regex.a \
- -DBoost_SYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_system.a \
- -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE="$WORKSPACE"/boost_1_67_0/libboost_unit_test_framework.a \
+ -DBoost_INCLUDE_DIR="$WORKSPACE"/boost_1_68_0/ \
+ -DBoost_FILESYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_68_0/libboost_filesystem.a \
+ -DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE="$WORKSPACE"/boost_1_68_0/libboost_program_options.a \
+ -DBoost_REGEX_LIBRARY_RELEASE="$WORKSPACE"/boost_1_68_0/libboost_regex.a \
+ -DBoost_SYSTEM_LIBRARY_RELEASE="$WORKSPACE"/boost_1_68_0/libboost_system.a \
+ -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE="$WORKSPACE"/boost_1_68_0/libboost_unit_test_framework.a \
-DTESTS=0 \
..
make -j 4
cd ..
mkdir -p upload
+# Patch soljson.js to provide backwards-compatibility with older emscripten versions
+echo ";/* backwards compatibility */ Module['Runtime'] = Module;" >> build/libsolc/soljson.js
cp build/libsolc/soljson.js upload/
cp build/libsolc/soljson.js ./