collate_raw_dylibs_elf in rustc_codegen_ssa::back::link::raw_dylib - Rust
Description: Extract all symbols defined in raw-dylib libraries, collated by library name.

Skip to main content

## collate_raw_dylibs_elf

# Function collate_raw_dylibs_elf

Source

    fn collate_raw_dylibs_elf<'a>(
        sess: &Session,
        used_libraries: impl IntoIterator<Item = &'a NativeLib>,
    ) -> Vec<(String, Vec<DllImport>, bool)>

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.