-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm32-unknown-emscripten programs crash with codegen-units > 1 #43101
Comments
Update: |
@kripken The emscripten-visible effect of having multiple codegen units is that the resulting rlib contains one object file for each codegen unit. Do you have a sense for whether this would be a Rust bug or an emscripten bug? |
Considering there's another breakage caused by codegen-units the issue before this one, I think it may be the same cause: #43095 |
Looks like this uses |
Nah, this right here is the old one that goes through asm.js |
Then the target looks wrong, does changing it to the asm.js target ( |
yikes, my setup was all screwed up and was always using the wasm backend. Using emsdk incoming this works as expected for both wasm32-unknown-emscripten and asmjs-uknown-emscripten. |
This is still an issue when using wasm32-experimental-emscripten. If I don't fix it in the next couple days I'll make a new issue. |
When libstd is built with codegen-units > 1, programs built for wasm32-unknown-emscripten can crash.
I tried this code:
hello.rs
I expected to see this happen:
Instead, this happened:
However, compiling libstd with
codegen-units = 1
gives the expected behavior.Meta
rustc:
emcc:
1.37.15 (commit e99b50793a81b97a2559ec93fa49c7a0a8aaa4cc)
node:
v8.1.2
config.toml:
The text was updated successfully, but these errors were encountered: