Skip to content

Commit 46575f1

Browse files
committed
Only borrow EncodedMetadata in codegen_crate
And move passing it to the linker to the driver code.
1 parent f383b17 commit 46575f1

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/lib.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -230,20 +230,9 @@ impl CodegenBackend for GccCodegenBackend {
230230
providers.global_backend_features = |tcx, ()| gcc_util::global_gcc_features(tcx.sess, true)
231231
}
232232

233-
fn codegen_crate(
234-
&self,
235-
tcx: TyCtxt<'_>,
236-
metadata: EncodedMetadata,
237-
need_metadata_module: bool,
238-
) -> Box<dyn Any> {
233+
fn codegen_crate(&self, tcx: TyCtxt<'_>, metadata: Option<&EncodedMetadata>) -> Box<dyn Any> {
239234
let target_cpu = target_cpu(tcx.sess);
240-
let res = codegen_crate(
241-
self.clone(),
242-
tcx,
243-
target_cpu.to_string(),
244-
metadata,
245-
need_metadata_module,
246-
);
235+
let res = codegen_crate(self.clone(), tcx, target_cpu.to_string(), metadata);
247236

248237
Box::new(res)
249238
}

0 commit comments

Comments
 (0)