fn collate_raw_dylibs<'a, 'b>(
    sess: &'a Session,
    used_libraries: impl IntoIterator<Item = &'b 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.