fn lto_when_needs_object(crate_types: &[CrateType]) -> Lto {
    if crate_types.iter().all(|ct| *ct == CrateType::Dylib) {
        // A dylib whose parent is running LTO. rustc currently
        // doesn't support LTO with dylibs, so bitcode is not
        // needed.
        Lto::OnlyObject
    } else {
        // Mixed rlib with a dylib or cdylib whose parent is running LTO. This
        // needs both: bitcode for the rlib (for LTO) and object code for the
        // dylib.
        Lto::ObjectAndBitcode
    }
}
/// Lto setting to use when this unit needs object code.
Lto setting to use when this unit needs object code.
Lto setting to use when this unit needs object code .
fn lto_when_needs_object(crate_types: &[CrateType]) -> Lto {
    if crate_types.iter().all(|ct| *ct == CrateType::Dylib) {
        // A dylib whose parent is running LTO. rustc currently
        // doesn't support LTO with dylibs, so bitcode is not
        // needed.
        Lto::OnlyObject
    } else {
        // Mixed rlib with a dylib or cdylib whose parent is running LTO. This
        // needs both: bitcode for the rlib (for LTO) and object code for the
        // dylib.
        Lto::ObjectAndBitcode
    }
}
fn lto_when_needs_object ( crate_types : & [ CrateType ] ) -> Lto { if crate_types . iter ( ) . all ( | ct | * ct == CrateType :: Dylib ) { // A dylib whose parent is running LTO. rustc currently // doesn't support LTO with dylibs, so bitcode is not // needed. Lto :: OnlyObject } else { // Mixed rlib with a dylib or cdylib whose parent is running LTO. This // needs both: bitcode for the rlib (for LTO) and object code for the // dylib. Lto :: ObjectAndBitcode } }
Lto setting to use when this unit needs object code.
Lto setting to use when this unit needs object code .
crate_types
&[CrateType]
crate_types
&[CrateType]