-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc --print file-names wrongly prints .rlib for --emit=metadata #54852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
cargo nightly will now invoke rustc with |
emilio
added a commit
to emilio/sccache
that referenced
this issue
Feb 3, 2020
This fixes cargo check in mozilla-central. The issue is that rustc --print file-names emits a somewhat poor approximation of what's actually going to be emitted. So for a staticlib crate, it will also print the staticlib file, which is not great. See https://bugzilla.mozilla.org/show_bug.cgi?id=1612855#c2 for a more straight-forward explanation of the failure case. Sccache would try to find the library and fail, erroring as a consequence. Pile up on the existing workaround for rmeta files not showing up (rust-lang/rust#54852) by removing files that are not metadata when we only request metadata. rust-lang/rust#68799 contains a rust-side fix that would also fix this.
froydnj
pushed a commit
to mozilla/sccache
that referenced
this issue
Feb 3, 2020
This fixes cargo check in mozilla-central. The issue is that rustc --print file-names emits a somewhat poor approximation of what's actually going to be emitted. So for a staticlib crate, it will also print the staticlib file, which is not great. See https://bugzilla.mozilla.org/show_bug.cgi?id=1612855#c2 for a more straight-forward explanation of the failure case. Sccache would try to find the library and fail, erroring as a consequence. Pile up on the existing workaround for rmeta files not showing up (rust-lang/rust#54852) by removing files that are not metadata when we only request metadata. rust-lang/rust#68799 contains a rust-side fix that would also fix this.
Triage: It seems to me as if
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
Labels
A-driver
Area: rustc_driver that ties everything together into the `rustc` compiler
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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 thatrustc
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)
The text was updated successfully, but these errors were encountered: