Add a warning when enabling LTO for crates with both cargo-types that support LTO and ones that don't. #4611
Labels
A-crate-types
Area: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
A-lto
Area: link-time optimization
S-needs-mentor
Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
As discussed in #2301, cargo silently builds a cdylib without LTO when the same crate also has rlib outputs, as rustc would otherwise error.
The only sign this has happened currently is the output binaries being way larger than expected. A warning would be very helpful for this.
The text was updated successfully, but these errors were encountered: