Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Use --export-table from the latest LLD (#316)
Browse files Browse the repository at this point in the history
* Remove unused build.sh

* Don't use wasm-export-table anymore.

* Rebuild binaries.

* Fix build script.
  • Loading branch information
pepyakin authored and gavofyork committed Jul 15, 2018
1 parent 3dfdce2 commit 1369641
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 24 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update stable
cargo install --git https://github.com/alexcrichton/wasm-gc
cargo install --git https://github.com/pepyakin/wasm-export-table.git
sudo apt install cmake pkg-config libssl-dev
```

Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ rustup update stable
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
command -v wasm-gc || \
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc

# At the moment of writing, rustc still uses LLD 6 which produces wasm binaries
# that don't export a table. Meanwhile, we are waiting for LLD 7 to come
# in rustc we could use this handy little tool.
command -v wasm-export-table || \
cargo +nightly install --git https://github.com/pepyakin/wasm-export-table.git
13 changes: 0 additions & 13 deletions polkadot/parachain/test-chains/build.sh

This file was deleted.

Binary file not shown.
Binary file not shown.
5 changes: 1 addition & 4 deletions substrate/executor/wasm/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/usr/bin/env bash
set -e

cargo +nightly build --target=wasm32-unknown-unknown --release
RUSTFLAGS="-C link-arg=--export-table" cargo +nightly build --target=wasm32-unknown-unknown --release
for i in test
do
# Add export of the default table under name 'table'.
wasm-export-table target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.table.wasm
cp target/wasm32-unknown-unknown/release/runtime_$i.table.wasm target/wasm32-unknown-unknown/release/runtime_$i.wasm
wasm-gc target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.compact.wasm
done
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 1369641

Please sign in to comment.