-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Can not disable reference-types
feature for wasm32 target with -C linker-plugin-lto
flag
#130604
Comments
Thanks for the report! I'm not actually sure what's going on here. My best guess though is that The LLVM IR going into Put another way, you're doing everything right here, and the bug lies somewhere in the interaction of codegen in target triple = "wasm32-unknown-unknown"
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
define void @foo(ptr %a) #0 {
call void %a()
ret void
}
attributes #0 = { nounwind "target-cpu"="mvp" } Locally I see:
I've opened llvm/llvm-project#109443 to see if folks have thoughts there. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
@alexcrichton this bug is also reproduced on the new target |
Can you provide reproduction steps necessary? Just saying "also reproduced on the new target" isn't too helpful at indicating what you're doing to reproduce this or what is even being reproduced. |
@alexcrichton Of course, same example, but with different branch: https://github.com/StackOverflowExcept1on/wasm-builder-regression/tree/wasm32v1-none git clone https://github.com/StackOverflowExcept1on/wasm-builder-regression.git --branch wasm32v1-none
cd wasm-builder-regression/wasm-project
./check.sh |
Oh, that's still the same bug at llvm/llvm-project#109443, which still hasn't been fixed. |
Code
@alexcrichton
Code is minimized as much as possible and here is a demo repository: https://github.com/StackOverflowExcept1on/wasm-builder-regression/
wasm-checker
- simple CLI tool that passes wasm to parity-wasm parser (it does not support reference-types)wasm-program
- this is smart contract that panics and terminates with an errorwasm-project
- some intermediate directory that is generated by our utilitygit clone https://github.com/StackOverflowExcept1on/wasm-builder-regression.git cd wasm-builder-regression/wasm-project ./check.sh
If I remove flag
-C linker-plugin-lto
, it works as described in #128511I expected to see this happen: I can disable
reference-types
via-Ctarget-cpu=mvp
and-Zbuild-std
Instead, this happened: there is some kind of conflict between compiler flags?
Version it worked on
It most recently worked on:
nightly-2024-07-31
Version with regression
rustc +nightly-2024-08-01 --version --verbose
:The text was updated successfully, but these errors were encountered: