diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs deleted file mode 100644 index 1350676ea0a..00000000000 --- a/src/librustc_codegen_llvm/back/link.rs +++ /dev/null @@ -1,25 +0,0 @@ -use rustc::session::config::OutputFilenames; -use rustc::session::Session; -use rustc_codegen_ssa::CodegenResults; -use super::archive::LlvmArchiveBuilder; - -use std::path::PathBuf; -pub use rustc_codegen_utils::link::*; - -/// Performs the linkage portion of the compilation phase. This will generate all -/// of the requested outputs for this compilation session. -pub(crate) fn link_binary<'a>( - sess: &'a Session, - codegen_results: &CodegenResults, - outputs: &OutputFilenames, - crate_name: &str, -) -> Vec { - let target_cpu = crate::llvm_util::target_cpu(sess); - rustc_codegen_ssa::back::link::link_binary::>( - sess, - codegen_results, - outputs, - crate_name, - target_cpu, - ) -} diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 8283d1aa1b5..cee0d5be647 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -71,9 +71,8 @@ use rustc_codegen_utils::codegen_backend::CodegenBackend; mod error_codes; mod back { - mod archive; + pub mod archive; pub mod bytecode; - pub mod link; pub mod lto; pub mod write; } @@ -327,8 +326,17 @@ impl CodegenBackend for LlvmCodegenBackend { // This should produce either a finished executable or library. sess.profiler(|p| p.start_activity("link_crate")); time(sess, "linking", || { - back::link::link_binary(sess, &codegen_results, - outputs, &codegen_results.crate_name.as_str()); + use rustc_codegen_ssa::back::link::link_binary; + use crate::back::archive::LlvmArchiveBuilder; + + let target_cpu = crate::llvm_util::target_cpu(sess); + link_binary::>( + sess, + &codegen_results, + outputs, + &codegen_results.crate_name.as_str(), + target_cpu, + ); }); sess.profiler(|p| p.end_activity("link_crate"));