Pass target_cpu to LinkerInfo::new instead of link_binary
This is one step towards separating the linking code from codegen backends
This commit is contained in:
parent
07968a001d
commit
55dbf17bb5
@ -295,7 +295,7 @@ pub(super) fn run_aot(
|
||||
metadata_module,
|
||||
metadata,
|
||||
windows_subsystem,
|
||||
linker_info: LinkerInfo::new(tcx),
|
||||
linker_info: LinkerInfo::new(tcx, crate::target_triple(tcx.sess).to_string()),
|
||||
crate_info: CrateInfo::new(tcx),
|
||||
},
|
||||
work_products,
|
||||
|
@ -267,13 +267,11 @@ fn link(
|
||||
) -> Result<(), ErrorReported> {
|
||||
use rustc_codegen_ssa::back::link::link_binary;
|
||||
|
||||
let target_cpu = crate::target_triple(sess).to_string();
|
||||
link_binary::<crate::archive::ArArchiveBuilder<'_>>(
|
||||
sess,
|
||||
&codegen_results,
|
||||
outputs,
|
||||
&codegen_results.crate_name.as_str(),
|
||||
&target_cpu,
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user