Skip to content

rustc --test -l static=somelib.a links with --whole-archive #116910

Closed
@xclaesse

Description

@xclaesse

Originally reported as #116900, but the actual bug affects every libraries and platforms.

rustc --test -l static:+verbatim=libsomelib.a generates the linker command -Wl,--whole-archive -l:libsomelib.a -Wl,--no-whole-archive. Without --test it correctly doesn't link whole archive.

It is expected to link whole archive only if passing +whole-archive modifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions