Skip to content

rustc --print file-names wrongly prints .rlib for --emit=metadata  #54852

@Marwes

Description

@Marwes
Contributor

For sccache to cache rustc builds it uses rustc --print file-names to figure out which files get emitted so it cache them for later. For --emit metadata builds it appears that rustc prints that it would emit a .rlib file which seems to be false, only .rmeta files get emitted.

Trying to find out where this happens but so far no luck (it might actually be correct behavior and the fix should be in sccache).

See mozilla/sccache#301 (comment)

Activity

added
A-driverArea: rustc_driver that ties everything together into the `rustc` compiler
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
on Jan 27, 2019
luser

luser commented on May 28, 2019

@luser
Contributor

cargo nightly will now invoke rustc with --emit=dep-info,metadata,link, but running rustc --emit=dep-info,metadata,link --print=file-names still doesn't print the rmeta name, which isn't good.

Enselic

Enselic commented on Nov 20, 2023

@Enselic
Member

Triage: It seems to me as if --print file-names does what it says it does? It's documentation is:

  • file-names — The names of the files created by the link emit kind.

Note that it does not claim to print the name of the metadata file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-driverArea: rustc_driver that ties everything together into the `rustc` compilerC-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

        Participants

        @Enselic@luser@Marwes@jonas-schievink

        Issue actions

          rustc --print file-names wrongly prints .rlib for --emit=metadata · Issue #54852 · rust-lang/rust