If a manual dependency exists, don't overwrite

This is a hack to work around miri being included in
our analysis of rustc-dev
Really, we should probably use an include set of the actual root libraries

I'm not sure how those are determined however
This commit is contained in:
Daniel McNab 2021-03-06 13:56:42 +00:00
parent 1076d21fc0
commit 7513867aa2

View file

@ -507,7 +507,14 @@ fn cargo_to_crate_graph(
continue;
}
for &from in pkg_crates.get(&pkg).into_iter().flatten() {
add_dep(&mut crate_graph, from, name.clone(), to);
if !crate_graph[from].dependencies.iter().any(|d| d.name == name) {
add_dep(&mut crate_graph, from, name.clone(), to);
} else {
// eprintln!(
// "Skipped {} for {:?}",
// &name, &crate_graph[from].display_name
// );
}
}
}
}