libc crate triggers warnings when compiled with default-features = false, features = ['rustc-dep-of-std']
#3789
Labels
C-bug
Category: bug
Summary
libc
used in rustc and therefore patched rustc to uselibc
from a local path. This made the compilation fail.libc
crate forx86_64-unknown-linux-gnu
(and probably other targets) produces warnings when usingdefault-features = false, features = ['rustc-dep-of-std']
(like for example the rust standard library does)libc
from crates.io and a heuristic in Cargo suppresses warnings from it in that caselibc
dependency from crates.io to a local folder, the warnings weren't suppressed anymore-D warnings
which makes the warnings in thelibc
crate fail the entire buildSteps to reproduce
Clone Rust and libc:
Add a path override for libc in rustc's Cargo workspace:
Try building the compiler (stage 0 std is enough to trigger the problem):
Compilation fails with the following output:
What should be fixed?
I think there's two parts to this:
libc
when using it like rustc does. Note: there might be more warnings than what I've pasted above.Feel free to ask questions about this issue. Thanks in advance for taking a look at it and let me know if there's anything I can do to fix the issue.
The text was updated successfully, but these errors were encountered: