-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't warn about v128
in wasm ABI transition
#139809
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
Conversation
rustbot has assigned @compiler-errors. Use |
Like with #139498, I'm going to beta-nominate this as the affected warning is currently present on beta. |
Hi @alexcrichton, could you elaborate on what you mean by "other warning if necessary"? Based on the reported code snippet in #138762 (comment) but with #![allow(wasm_c_abi)]
use std::arch::wasm32::{
v128,
v128_any_true};
#[no_mangle]
pub fn any_true(a: v128) -> bool {
v128_any_true(a)
} I'm not observing another warning, am I missing something? Or rather, could you slightly elaborate on why |
Oh sure yeah, this code: use std::arch::wasm32::*;
#[unsafe(no_mangle)]
#[target_feature(enable = "simd128")]
pub extern "C" fn foo(_: v128) {}
This PR is just addressing the second one which shows up transitively through crates, not the first one which I'm not changing here. |
Thanks, that's what I was missing |
6925ce1
to
38667e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@bors r+ rollup |
improper_ctypes warns about so many things that are needed in practice and generally work fine, chances are people have it allowed... but I guess then they don't get to complain if we change the ABI.^^ |
I suppose we can call this out in relnotes? |
Unsettled discussion on trade-offs |
We have a blogpost about the transition, and the relnotes (I expect) will link there. So there are other ways people can learn about this. But, also note that improper_ctypes is not an FCW so unlike this warning, it will not show up for dependencies. If my dependency passes |
Sorry I'm a bit confused, what's being asked for here? The |
I'm slightly concerned some crate could be passing Can you point at the declaration of such an intrinsic that causes a warning? Why would an intrinsic use the "C" ABI? Usually they do not. |
The intrinsics that get the warning are LLVM intrinsics, not Rust intrinsics, which stdarch declares as |
r? RalfJung (since you have concerns) |
Reminder, once the PR becomes ready for a review, use |
You mean stdarch? There's no release, you just need to update the submodule. |
This has other warnings if necessary and doesn't need extra warnings from this FCW. cc rust-lang#138762
53a5900
to
19e44d4
Compare
@rustbot ready |
Ah sorry, I mixed up the crates. |
@alexcrichton thanks, and sorry for the delay! |
…fJung Don't warn about `v128` in wasm ABI transition The `-Zwasm-c-abi=spec` mode of `extern "C"` does not actually change the meaning of `v128` meaning that the FCW lint firing is a false positive. cc rust-lang#138762 (comment)
Rollup of 23 pull requests Successful merges: - rust-lang#139261 (mitigate MSVC alignment issue on x86-32) - rust-lang#139307 (std: Add performance warnings to HashMap::get_disjoint_mut) - rust-lang#139700 (Autodiff flags) - rust-lang#139752 (set subsections_via_symbols for ld64 helper sections) - rust-lang#139809 (Don't warn about `v128` in wasm ABI transition) - rust-lang#139852 (StableMIR: Implement `CompilerInterface`) - rust-lang#139945 (Extend HIR to track the source and syntax of a lifetime) - rust-lang#140028 (`deref_patterns`: support string and byte string literals in explicit `deref!("...")` patterns) - rust-lang#140139 (rustc_target: Adjust RISC-V feature implication) - rust-lang#140143 (Move `sys::pal::os::Env` into `sys::env`) - rust-lang#140148 (CI: use aws codebuild for job dist-arm-linux) - rust-lang#140150 (fix MAX_EXP and MIN_EXP docs) - rust-lang#140172 (Make algebraic functions into `const fn` items.) - rust-lang#140177 ([compiletest] Parallelize test discovery) - rust-lang#140181 (Remove `synstructure::Structure::underscore_const` calls.) - rust-lang#140184 (Update doc of cygwin target) - rust-lang#140186 (Rename `compute_x` methods) - rust-lang#140187 ([AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test) - rust-lang#140191 (Remove git repository from git config) - rust-lang#140194 (minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes`) - rust-lang#140195 (triagebot: label minicore changes w/ `A-test-infra-minicore` and ping jieyouxu on changes) - rust-lang#140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - rust-lang#140214 (Remove comment about handling non-global where bounds with corresponding projection) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#134446 (Stabilize the `cell_update` feature) - rust-lang#139307 (std: Add performance warnings to HashMap::get_disjoint_mut) - rust-lang#139450 (Impl new API `std::os::unix::fs::mkfifo` under feature `unix_fifo`) - rust-lang#139809 (Don't warn about `v128` in wasm ABI transition) - rust-lang#139852 (StableMIR: Implement `CompilerInterface`) - rust-lang#139945 (Extend HIR to track the source and syntax of a lifetime) - rust-lang#140028 (`deref_patterns`: support string and byte string literals in explicit `deref!("...")` patterns) - rust-lang#140181 (Remove `synstructure::Structure::underscore_const` calls.) - rust-lang#140232 (Remove unnecessary clones) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139809 - alexcrichton:wasm-simd-safe, r=RalfJung Don't warn about `v128` in wasm ABI transition The `-Zwasm-c-abi=spec` mode of `extern "C"` does not actually change the meaning of `v128` meaning that the FCW lint firing is a false positive. cc rust-lang#138762 (comment)
This was discussed in today's compiler triage meeting. Beta backport was approved. Thanks! @rustbot label: +beta-accepted |
[beta] backports - Do not mix normalized and unnormalized caller bounds when constructing param-env for `receiver_is_dispatchable` rust-lang#138941 - Ignore zero-sized types in wasm future-compat warning rust-lang#139498 - Don't warn about `v128` in wasm ABI transition rust-lang#139809 - Revert overzealous parse recovery for single colons in paths rust-lang#140228 r? cuviper
[beta] backports - Do not mix normalized and unnormalized caller bounds when constructing param-env for `receiver_is_dispatchable` rust-lang#138941 - Ignore zero-sized types in wasm future-compat warning rust-lang#139498 - Don't warn about `v128` in wasm ABI transition rust-lang#139809 - Revert overzealous parse recovery for single colons in paths rust-lang#140228 r? cuviper
[beta] backports - Do not mix normalized and unnormalized caller bounds when constructing param-env for `receiver_is_dispatchable` rust-lang#138941 - Ignore zero-sized types in wasm future-compat warning rust-lang#139498 - Don't warn about `v128` in wasm ABI transition rust-lang#139809 - Revert overzealous parse recovery for single colons in paths rust-lang#140228 r? cuviper
The
-Zwasm-c-abi=spec
mode ofextern "C"
does not actually change the meaning ofv128
meaning that the FCW lint firing is a false positive.cc #138762 (comment)