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_module,
|
||||||
metadata,
|
metadata,
|
||||||
windows_subsystem,
|
windows_subsystem,
|
||||||
linker_info: LinkerInfo::new(tcx),
|
linker_info: LinkerInfo::new(tcx, crate::target_triple(tcx.sess).to_string()),
|
||||||
crate_info: CrateInfo::new(tcx),
|
crate_info: CrateInfo::new(tcx),
|
||||||
},
|
},
|
||||||
work_products,
|
work_products,
|
||||||
|
@ -267,13 +267,11 @@ fn link(
|
|||||||
) -> Result<(), ErrorReported> {
|
) -> Result<(), ErrorReported> {
|
||||||
use rustc_codegen_ssa::back::link::link_binary;
|
use rustc_codegen_ssa::back::link::link_binary;
|
||||||
|
|
||||||
let target_cpu = crate::target_triple(sess).to_string();
|
|
||||||
link_binary::<crate::archive::ArArchiveBuilder<'_>>(
|
link_binary::<crate::archive::ArArchiveBuilder<'_>>(
|
||||||
sess,
|
sess,
|
||||||
&codegen_results,
|
&codegen_results,
|
||||||
outputs,
|
outputs,
|
||||||
&codegen_results.crate_name.as_str(),
|
&codegen_results.crate_name.as_str(),
|
||||||
&target_cpu,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user