Are Rust standard libraries (core, alloc and std) built with codegen-units=1?

I recently made a change in STD and noticed that functions I added not inlined (e.g. <&[u8]>::spec_new_impl not inlined into <&str>::spec_new_impl) as I expected.

Also, CString::from_vec_unchecked not inlined into <&[u8]>::spec_new_impl.

However, those inlining happens when I enable LTO so I think they would be inlined if std would be built with -Ccodegen-units=1.

Are distribution builds (e.g. stable releases and nightlies) built with codegen-units=1 or not?

Most contributors to Rust don't actively monitor this forum. You'd have better luck asking on internals.rust-lang.org. Or for "simple" questions like this, asking directly on Zulip will probably get you a quicker answer.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.