diff --git a/src/driver/aot.rs b/src/driver/aot.rs index ed3bdedddce..c7121b93861 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -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, diff --git a/src/lib.rs b/src/lib.rs index 720d2a12534..75b7b9bbeb5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::>( sess, &codegen_results, outputs, &codegen_results.crate_name.as_str(), - &target_cpu, ); Ok(())