summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-28 22:14:09 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-05-02 18:00:20 +0200
commit808090eb073d8b2d56479045b6ef0fe67872a077 (patch)
tree7d64ab8200c8bef48d5543924f8e3b9b3691361a /compiler/rustc_codegen_cranelift/src
parent673c1b6e496432e68bca148fcfdae647ad21befb (diff)
downloadrust-808090eb073d8b2d56479045b6ef0fe67872a077.tar.gz
rust-808090eb073d8b2d56479045b6ef0fe67872a077.zip
Pass target_cpu to LinkerInfo::new instead of link_binary
This is one step towards separating the linking code from codegen backends
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/aot.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/lib.rs2
2 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
index ed3bdedddce..c7121b93861 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs
+++ b/compiler/rustc_codegen_cranelift/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/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs
index 720d2a12534..75b7b9bbeb5 100644
--- a/compiler/rustc_codegen_cranelift/src/lib.rs
+++ b/compiler/rustc_codegen_cranelift/src/lib.rs
@@ -267,13 +267,11 @@ impl CodegenBackend for CraneliftCodegenBackend {
     ) -> 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(())