rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.26k stars 12.57k forks source link

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

Open Marwes opened 5 years ago

Marwes commented 5 years ago

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 https://github.com/mozilla/sccache/issues/301#issuecomment-427412157

luser commented 5 years ago

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 commented 10 months ago

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.