openSUSE-Rust / cargo-packaging

Cargo Packaging macros
Mozilla Public License 2.0
5 stars 6 forks source link

Use codegen-units=1 #11

Closed bmwiedemann closed 3 months ago

bmwiedemann commented 3 months ago

This produces binaries that are better optimized and deterministic.

This may become obsolete when https://github.com/rust-lang/rust/issues/128675 is resolved.

Firstyear commented 3 months ago

This causes issues in OBS, as most builders lack the memory needed to build with codegen units=1. It also significantly increases build times, and the optimisation gains are minimal. We will defer to the upstream defaults in this case.