Skip to content

Commit b800a34

Browse files
oisyneddyb
authored andcommitted
Compile fixes
1 parent bbc97e7 commit b800a34

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/rustc_codegen_spirv/src/codegen_cx/entry.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ impl<'tcx> CodegenCx<'tcx> {
4141
.span_err(span, &format!("Cannot declare {} as an entry point", name));
4242
return;
4343
};
44-
let fn_hir_id = self.tcx.hir().local_def_id_to_hir_id(fn_local_def_id);
45-
let body = self.tcx.hir().body(self.tcx.hir().body_owned_by(fn_hir_id));
44+
let body = self
45+
.tcx
46+
.hir()
47+
.body(self.tcx.hir().body_owned_by(fn_local_def_id));
4648
body.params
4749
};
4850
for (arg_abi, hir_param) in fn_abi.args.iter().zip(hir_params) {

crates/rustc_codegen_spirv/src/link.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ fn link_rlib(sess: &Session, codegen_results: &CodegenResults, out_filename: &Pa
9595
| NativeLibKind::Dylib { .. }
9696
| NativeLibKind::Framework { .. }
9797
| NativeLibKind::RawDylib
98+
| NativeLibKind::LinkArg
9899
| NativeLibKind::Unspecified => continue,
99100
}
100101
if let Some(name) = lib.name {
@@ -445,6 +446,10 @@ fn add_upstream_native_libraries(
445446
NativeLibKind::RawDylib => {
446447
sess.fatal(&format!("raw_dylib feature not yet implemented: {}", name))
447448
}
449+
NativeLibKind::LinkArg => sess.fatal(&format!(
450+
"TODO: linkarg nativelibkind not supported yet: {}",
451+
name
452+
)),
448453
}
449454
}
450455
}

0 commit comments

Comments
 (0)