diff --git a/runner/build.sh b/runner/build.sh index eb08957..cc62c83 100755 --- a/runner/build.sh +++ b/runner/build.sh @@ -8,7 +8,7 @@ file=$1 if [ ${file: -3} == ".rs" ] then # Rust is compiled with rustc - rustc $file -o out/contract.js -O --target wasm32-unknown-emscripten + rustc $file -o out/contract.js -O --target wasm32-unknown-emscripten -C linker=./linker_emcc.sh # Gas injector cargo run --manifest-path=./../gas/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm diff --git a/runner/linker_emcc.sh b/runner/linker_emcc.sh new file mode 100755 index 0000000..b2d52b4 --- /dev/null +++ b/runner/linker_emcc.sh @@ -0,0 +1,4 @@ +#!/bin/sh +args="$*" +filtered_args=${args/ERROR_ON_UNDEFINED_SYMBOLS\=1/ERROR_ON_UNDEFINED_SYMBOLS\=0} +emcc $filtered_args \ No newline at end of file