mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Print more crate details in -Zls
Useful for debugging crate hash and resolution issues.
This commit is contained in:
parent
406d4a9cc3
commit
cef3ab75b1
@ -601,10 +601,23 @@ impl MetadataBlob {
|
||||
}
|
||||
|
||||
crate fn list_crate_metadata(&self, out: &mut dyn io::Write) -> io::Result<()> {
|
||||
write!(out, "=External Dependencies=\n")?;
|
||||
let root = self.get_root();
|
||||
writeln!(out, "Crate info:")?;
|
||||
writeln!(out, "name {}{}", root.name, root.extra_filename)?;
|
||||
writeln!(out, "hash {} stable_crate_id {:?}", root.hash, root.stable_crate_id)?;
|
||||
writeln!(out, "proc_macro {:?}", root.proc_macro_data.is_some())?;
|
||||
writeln!(out, "=External Dependencies=")?;
|
||||
for (i, dep) in root.crate_deps.decode(self).enumerate() {
|
||||
write!(out, "{} {}{}\n", i + 1, dep.name, dep.extra_filename)?;
|
||||
writeln!(
|
||||
out,
|
||||
"{} {}{} hash {} host_hash {:?} kind {:?}",
|
||||
i + 1,
|
||||
dep.name,
|
||||
dep.extra_filename,
|
||||
dep.hash,
|
||||
dep.host_hash,
|
||||
dep.kind
|
||||
)?;
|
||||
}
|
||||
write!(out, "\n")?;
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user