Function rustc_codegen_ssa::back::link::collate_raw_dylibs

source ·
fn collate_raw_dylibs<'a>(
    sess: &Session,
    used_libraries: impl IntoIterator<Item = &'a NativeLib>
) -> Result<Vec<(String, Vec<DllImport>)>, ErrorGuaranteed>
Expand description

Extract all symbols defined in raw-dylib libraries, collated by library name.

If we have multiple extern blocks that specify symbols defined in the same raw-dylib library, then the CodegenResults value contains one NativeLib instance for each block. However, the linker appears to expect only a single import library for each library used, so we need to collate the symbols together by library name before generating the import libraries.