Skip to content

Add option to not include .o files from a .a in the .rlib which uses them #38095

Closed
@jsgf

Description

@jsgf

At the moment, if a Rust crate has a linkage with a static library (libfoo.a), it will extract all the .o files from the .a and insert them into the .rlib (which is also an ar archive).

This is fine for small libraries, but can be a problem if the library is very large, both because of the excessive IO, and from storage use.

It would be good if rustc had an option to not do this, but instead just remember a reference to the .a file for use at final binary generation time (assuming the final link has the appropriate -L native=<dir> option).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions