diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/entry.rs b/crates/rustc_codegen_spirv/src/codegen_cx/entry.rs index ae13b03363..a1142adc96 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/entry.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/entry.rs @@ -41,8 +41,10 @@ impl<'tcx> CodegenCx<'tcx> { .span_err(span, &format!("Cannot declare {} as an entry point", name)); return; }; - let fn_hir_id = self.tcx.hir().local_def_id_to_hir_id(fn_local_def_id); - let body = self.tcx.hir().body(self.tcx.hir().body_owned_by(fn_hir_id)); + let body = self + .tcx + .hir() + .body(self.tcx.hir().body_owned_by(fn_local_def_id)); body.params }; for (arg_abi, hir_param) in fn_abi.args.iter().zip(hir_params) { diff --git a/crates/rustc_codegen_spirv/src/link.rs b/crates/rustc_codegen_spirv/src/link.rs index 7417ad439d..3adb5ebb00 100644 --- a/crates/rustc_codegen_spirv/src/link.rs +++ b/crates/rustc_codegen_spirv/src/link.rs @@ -95,6 +95,7 @@ fn link_rlib(sess: &Session, codegen_results: &CodegenResults, out_filename: &Pa | NativeLibKind::Dylib { .. } | NativeLibKind::Framework { .. } | NativeLibKind::RawDylib + | NativeLibKind::LinkArg | NativeLibKind::Unspecified => continue, } if let Some(name) = lib.name { @@ -445,6 +446,10 @@ fn add_upstream_native_libraries( NativeLibKind::RawDylib => { sess.fatal(&format!("raw_dylib feature not yet implemented: {}", name)) } + NativeLibKind::LinkArg => sess.fatal(&format!( + "TODO: linkarg nativelibkind not supported yet: {}", + name + )), } } }