Fix wasm_threads example for rustc changes - #1090
Open
kevinmehall wants to merge 1 commit into
Open
Conversation
The `wasm_threads` example currently fails at runtime with: ``` panicked at wasm_thread-0.3.0/src/wasm32/mod.rs:349:10: called `Result::unwrap()` on an `Err` value: JsValue(DataCloneError: WebAssembly.Memory object could not be cloned. ``` This is because last year, rustc stopped setting the necessary linker options based on the atomics target feature and these linker options must now be passed explicitly. rust-lang/rust#147225 These rustflags come from the rustc PR, with the addition of `__heap_base` because I was getting an error `failed to find \`__heap_base\` for injecting thread id` without it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
wasm_threadsexample currently fails at runtime with:This is because last year, rustc stopped setting the necessary linker options based on the atomics target feature and these linker options must now be passed explicitly.
rust-lang/rust#147225
These rustflags come from the rustc PR, with the addition of
__heap_basebecause I was getting an error "failed to find__heap_basefor injecting thread id" without it.