mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
f8e3af446e
Fix requires_lto targets needing lto set in cargo Targets that set `requires_lto = true` were not actually using lto when compiling with cargo by default. They needed an extra `lto = true` in `Cargo.toml` to work. Fix this by letting lto take precedence over the `embed_bitcode` flag when lto is required by a target. If both these flags would be supplied by the user, an error is generated. However, this did not happen when lto was requested by the target instead of the user. Fixes rust-lang/rust#148514 Tracking issue: rust-lang/rust#135024
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.