Skip to content

Commit

Permalink
Merge pull request ethereum#7917 from ethereum/solc-backwards-compat
Browse files Browse the repository at this point in the history
Add backwards compatibility to the generated soljson.js for solc-js <0.5.14
  • Loading branch information
chriseth authored Dec 9, 2019
2 parents d666756 + b4a260d commit e075b10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions scripts/travis-emscripten/build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ make -j 4

cd ..
mkdir -p upload
# Patch soljson.js to provide backwards-compatibility with older emscripten versions
# TODO: remove in 0.6.0!
echo -n ";/* backwards compatibility */ Module['Runtime'] = Module; Module['Pointer_stringify'] = Module['UTF8ToString'];" >> $BUILD_DIR/libsolc/soljson.js
cp $BUILD_DIR/libsolc/soljson.js upload/
cp $BUILD_DIR/libsolc/soljson.js ./

Expand Down
4 changes: 2 additions & 2 deletions test/externalTests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function setup_solcjs

cd "$dir"
printLog "Setting up solc-js..."
git clone --depth 1 -b master https://github.com/ethereum/solc-js.git solc
git clone --depth 1 -b v0.5.0 https://github.com/ethereum/solc-js.git solc

cd solc
npm install
Expand Down Expand Up @@ -107,7 +107,7 @@ function force_solc_truffle_modules
if [ -d "$d" ]; then
cd $d
rm -rf solc
git clone --depth 1 -b master https://github.com/ethereum/solc-js.git solc
git clone --depth 1 -b v0.5.0 https://github.com/ethereum/solc-js.git solc
cp "$1" solc/soljson.js
fi
)
Expand Down
2 changes: 1 addition & 1 deletion test/solcjsTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ VERSION="$2"
DIR=$(mktemp -d)
(
echo "Preparing solc-js (master)..."
git clone --depth 1 --branch master https://github.com/ethereum/solc-js "$DIR"
git clone --depth 1 --branch v0.5.0 https://github.com/ethereum/solc-js "$DIR"
cd "$DIR"
# disable "prepublish" script which downloads the latest version
# (we will replace it anyway and it is often incorrectly cached
Expand Down

0 comments on commit e075b10

Please sign in to comment.