Skip to content

Commit

Permalink
Fix build of raytrace example on nightly
Browse files Browse the repository at this point in the history
The `__wasm_init_memory` function is no longer exported and we also need
to build with `+mutable-globals`.

Closes rustwasm#2487
  • Loading branch information
alexcrichton committed Mar 11, 2021
1 parent 1e4390f commit 08f7488
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly-2021-01-23
toolchain: nightly-2021-03-11
- template: ci/azure-install-node.yml
- script: cargo test --target wasm32-unknown-unknown --features nightly --test wasm

Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly-2020-08-27
toolchain: nightly-2021-03-11
- script: rustup component add rust-src
displayName: "install rust-src"
- script: |
Expand Down
1 change: 0 additions & 1 deletion crates/threads-xform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ impl Config {
mem.maximum = Some(cmp::max(self.maximum_memory / PAGE_SIZE, prev_max));
assert!(mem.data_segments.is_empty());

delete_synthetic_func(module, "__wasm_init_memory")?;
let tls = Tls {
init: delete_synthetic_func(module, "__wasm_init_tls")?,
size: delete_synthetic_global(module, "__tls_size")?,
Expand Down
2 changes: 1 addition & 1 deletion examples/raytrace-parallel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -ex
# features enabled, ensuring that LLVM will generate atomic instructions,
# shared memory, passive segments, etc.

RUSTFLAGS='-C target-feature=+atomics,+bulk-memory' \
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
cargo build --target wasm32-unknown-unknown --release -Z build-std=std,panic_abort

# Note the usage of `--target no-modules` here which is required for passing
Expand Down

0 comments on commit 08f7488

Please sign in to comment.