rustc_codegen_ssa::back::link

Function ignored_for_lto

Source
pub fn ignored_for_lto(sess: &Session, info: &CrateInfo, cnum: CrateNum) -> bool
Expand description

Returns a boolean indicating whether the specified crate should be ignored during LTO.

Crates ignored during LTO are not lumped together in the “massive object file” that we create and are linked in their normal rlib states. See comments below for what crates do not participate in LTO.

It’s unusual for a crate to not participate in LTO. Typically only compiler-specific and unstable crates have a reason to not participate in LTO.