diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-03-28 22:14:09 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-02 18:00:20 +0200 |
| commit | 808090eb073d8b2d56479045b6ef0fe67872a077 (patch) | |
| tree | 7d64ab8200c8bef48d5543924f8e3b9b3691361a /compiler/rustc_codegen_llvm/src | |
| parent | 673c1b6e496432e68bca148fcfdae647ad21befb (diff) | |
| download | rust-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_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 5ca4b226c38..4707d17f18e 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -270,6 +270,7 @@ impl CodegenBackend for LlvmCodegenBackend { Box::new(rustc_codegen_ssa::base::codegen_crate( LlvmCodegenBackend(()), tcx, + crate::llvm_util::target_cpu(tcx.sess).to_string(), metadata, need_metadata_module, )) @@ -305,13 +306,11 @@ impl CodegenBackend for LlvmCodegenBackend { // Run the linker on any artifacts that resulted from the LLVM run. // This should produce either a finished executable or library. - let target_cpu = crate::llvm_util::target_cpu(sess); link_binary::<LlvmArchiveBuilder<'_>>( sess, &codegen_results, outputs, &codegen_results.crate_name.as_str(), - target_cpu, ); Ok(()) |
