Skip to content

Commit

Permalink
Fix build of raytrace example on nightly (#2488)
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 #2487
  • Loading branch information
alexcrichton committed May 10, 2021
1 parent c8fb41f commit f722cec
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
Expand Up @@ -87,7 +87,7 @@ jobs:
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly-2021-03-28
toolchain: nightly-2021-05-09
- 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-05-09
- 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
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
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 f722cec

Please sign in to comment.