Skip to content

Commit 7705116

Browse files
committed
Fix each_linked_rlib when the current crate has 0 crate types
1 parent ed77a61 commit 7705116

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+3
-0
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+3
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ pub fn each_linked_rlib(
230230
});
231231
}
232232
}
233+
if info.dependency_formats.is_empty() {
234+
return Err(errors::LinkRlibError::MissingFormat);
235+
}
233236
&info.dependency_formats[0].1
234237
} else {
235238
let fmts = info

0 commit comments

Comments
 (0)