Skip to content

rustc --emit=dep-info -Zbinary-dep-depinfo -C prefer-dynamic=yes misses .so input dep #90106

Open
@fangism

Description

@fangism

With a command like:

rustc --emit=dep-info=foo.d -Zbinary-dep-depinfo -C prefer-dynamic ...

which uses the rust std library:

libstd-dafa2c58b8297b90.rlib
libstd-dafa2c58b8297b90.so

I expected to see both the .rlib and .so in the generated depfile, however, the .so is missing.

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (af9b508e1 2021-10-15)
binary: rustc
commit-hash: af9b508e1d6c83a8f0e6f5c0b2b75598aa37ed27
commit-date: 2021-10-15
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0

Why this is important: We rely on the depfile to know what inputs to upload for remote building. When the .so file is missing we find that rustc still silently and happily builds the crate, but with a different (static?) linking result, which means local output != remote output (but we want perfect reproducibility).

Metadata

Metadata

Assignees

No one assigned

    Labels

    -Cprefer-dynamicCodegen option: Prefer dynamic linking to static linking.C-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