History of codegen-units


I am trying to dig up some information about Cargo.toml codegen-units. I see the feature referenced as far back as 2014: https://internals.rust-lang.org/t/default-settings-for-parallel-codegen/519

If anyone with background in this area can answer any of these questions, I’d really appreciate:

  1. What is the minimum Rust needed to pass codegen-units in a Cargo.toml?
  2. When was the codegen-units set to 16 for release profiles? I thought I remembered reading about this in a blog, but can’t find it. This reduces the full amount of optimizations that can be used (e.g. https://github.com/rust-lang/rust/issues/47745) and I’m trying to bring this information together into a min-sized-rust repo that shows how to minimize Rust binary size.

Edit: Found that Rust 1.24.0 set the default to 16: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-7