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

Use --export-table from the latest LLD #316

Merged
merged 4 commits into from
Jul 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.