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

Commit 1369641

Browse files
pepyakingavofyork
authored andcommitted
Use --export-table from the latest LLD (#316)
* Remove unused build.sh * Don't use wasm-export-table anymore. * Rebuild binaries. * Fix build script.
1 parent 3dfdce2 commit 1369641

File tree

12 files changed

+1
-24
lines changed

12 files changed

+1
-24
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ rustup update nightly
7373
rustup target add wasm32-unknown-unknown --toolchain nightly
7474
rustup update stable
7575
cargo install --git https://github.com/alexcrichton/wasm-gc
76-
cargo install --git https://github.com/pepyakin/wasm-export-table.git
7776
sudo apt install cmake pkg-config libssl-dev
7877
```
7978

Binary file not shown.
Binary file not shown.

init.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ rustup update stable
1111
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
1212
command -v wasm-gc || \
1313
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc
14-
15-
# At the moment of writing, rustc still uses LLD 6 which produces wasm binaries
16-
# that don't export a table. Meanwhile, we are waiting for LLD 7 to come
17-
# in rustc we could use this handy little tool.
18-
command -v wasm-export-table || \
19-
cargo +nightly install --git https://github.com/pepyakin/wasm-export-table.git

polkadot/parachain/test-chains/build.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.
Binary file not shown.

substrate/executor/wasm/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/usr/bin/env bash
22
set -e
33

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

0 commit comments

Comments
 (0)