Closed cr1901 closed 4 years ago
Thanks for the report! It looks like this is a bug in rustc's incremental support. We should be turning incremental off anyways (#44), I'll take a look into that.
Oh, and the incremental thing looks like a known issue: https://github.com/rust-lang/rust/issues/65023 https://github.com/rust-lang/rust/issues/58633
Closed by https://github.com/rust-lang/cargo/pull/8177.
Excellent, ty for your work! One question:
- Lints are capped to "allow" for std crates, and warnings are not shown by default.
Not that I have immediate use for this, but is it possible to override this setting to see std warnings if I desire?
-vv
lowers the lint cap to warning for all crates.
All references to
-Clink-arg
are in a.cargo/config
file. I can't duplicate this behavior usingcargo rustc
on the command-line.I have an msp430 project I'm testing with
-Zbuild-std=core
. The.cargo/config
file normally looks like this:Therefore, my command line invocation always looks like
cargo build -Zbuild-std=core
, relying on cargo to infer the target.When I build a debug binary with or without
-Clink-arg=-lc
after acargo clean
, the build works fine. However, if I do a subsequent build where I either add-Clink-arg=-lc
if it was missing, or remove-Clink-arg=-lc
if it was present, I get a large number of warnings I don't understand, referring to unused attributes:These warnings remain, no matter whether I include
-Clink-arg=-lgcc
or not, on subsequent builds until I do the nextcargo clean
. The warnings even occur when I switch between linking tomemcpy
and friends usinglibc
to linking againstrlibc
instead (again, until the nextcargo clean
). This behavior does not happen during release builds.Beside being noise in my console, these warnings may very well be harmless. But I would expect the warnings to not persist after every other recompilation of
libcore
no matter what linker flags I pass tocargo
. This makes me thinklibcore
builds using-Zbuild-std=core
are not duplicable w/ the same exact flags betweencargo
invocations, depending on what linker argscargo
has seen before.I cannot duplicate this behavior in
xargo
. Possibly relevant:xargo
always compileslibcore
etc in release mode.