-
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
cargo relies on unknown crate type warnings to detect if a target supports crate types, which can be suppressed by -Awarnings
and thus break cargo's detection
#116626
Comments
What happens if you manually run the mentioned rustc command? Does it print anything? Does it crash? |
The problem is that cargo is looking for:
to know which crate types are not supported. Suppressing that warning causes a mismatch of the list of crate names and what cargo is expecting. One unbaked idea is to have a better interface between cargo and rustc of discovering target information (like maybe a JSON api). Right now, it uses a hacked delimiter system (using the |
Something else i have to say, even if this bug is fixed: i have a reasonably long wasm rusflags in the config.toml. They need to be there for rust Anylazer to interpret the code correctly, and facilitate development. My project is growing very big, and i have occasional warnings to mark unimplemented pieces. But when i am running many builds for deployment, warnings clutter the output, and i miss what's happening, if there is a crate that fails, because i am not looking and waiting for the entire period. Also, i use a combination of cargo, cross and zigbuild to cross compile from my mac. I cannot just use cargo rust c for these extensions. That's why disabling warning must be separate than the other rustflags, as a cargo argument, --disable-warnings. And that can then be added to cross and zigbuilds afterwards too. |
Is there a workaround? I'd like to keep warnings disabled when targeting wasm. |
Seems like |
-Awarnings
and thus break cargo's detection
This should be fixed via rust-lang/cargo#15036. @jieyouxu guess we can close this? |
When compiling a Rust project for the
wasm32-unknown-unknown
target with the-Awarnings
flag, the following error is encountered:Steps To Reproduce:
Create blank project
Set RUSTFLAGS to "-Awarnings"
Run the command: cargo build --target wasm32-unknown-unknown
(Tested on Latest Stable as well)
The text was updated successfully, but these errors were encountered: