Explicitly pass in which crate type to use to each_linked_rlib

Otherwise we may pick the dependency formats for say a dylib when
linking a staticlib.
This commit is contained in:
bjorn3 2022-12-28 17:45:06 +00:00
parent 0b54782cc8
commit ed77a61901
2 changed files with 75 additions and 75 deletions

View file

@ -1002,7 +1002,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
let sess = tcx.sess;
let mut each_linked_rlib_for_lto = Vec::new();
drop(link::each_linked_rlib(sess, crate_info, &mut |cnum, path| {
drop(link::each_linked_rlib(crate_info, None, &mut |cnum, path| {
if link::ignored_for_lto(sess, crate_info, cnum) {
return;
}