From f26c492a7368826f68de1dd49eb091ef85782739 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Thu, 4 May 2017 21:34:41 +0300 Subject: [PATCH] custom linker temporal workaround --- runner/build.sh | 2 +- runner/linker_emcc.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 runner/linker_emcc.sh 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