We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7c59df commit 1ca8d26Copy full SHA for 1ca8d26
src/driver/lto.rs
@@ -195,7 +195,15 @@ pub(super) fn load_lto_modules(
195
object::read::File::parse(child.data(&*archive_data).expect("corrupt rlib"))
196
.unwrap();
197
let module = SerializableModule::deserialize(
198
- lto_object.section_by_name(".rodata.cgclif_lto").unwrap().data().unwrap(),
+ lto_object
199
+ .section_by_name(".rodata.cgclif_lto")
200
+ .unwrap_or_else(|| {
201
+ tcx.sess
202
+ .dcx()
203
+ .fatal(format!("no LTO data found for {}({name})", path.display()));
204
+ })
205
+ .data()
206
+ .unwrap(),
207
crate::build_isa(tcx.sess, false),
208
);
209
modules.push((name.to_owned(), module));
0 commit comments