Skip to content

--emit=dep-info or some flag should include rlibs & externally linked files that will be used #57717

Open
@cramertj

Description

@cramertj

Currently, --emit=dep-info only shows source files that are included in the current crate. There should be another mode (or the behavior should be extended) to include all files that will be used by the equivalent non-dep-info invocation of rustc. This includes rlibs of all crates used by the build, both explicitly in --extern and brought in through lib search paths, as well as external object files etc. that may be linked in. This is necessary in order to add Rust support to remote compilers and compiler caches, which depend on the exact hashes of all files used in the build.

Note that AFAICT sccache currently works around this by relying on some behaviors of cargo and depending on all the libraries contained in link paths. (@luser / @alexcrichton please correct me if I'm wrong here). I'd like to instead ensure that we can ship the exact set of files needed for compilation, both of libraries, and for the final link step.

i'm sure what I've written above is probably partially incorrect and misrepresentative somehow, but hopefully others will correct my errors and we can work towards a solution together :)

cc @juliehockett @petrhosek

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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