Introduce an ArchiveBuilderBuilder
This avoids monomorphizing all linker code for each codegen backend and will allow passing in extra information to the archive builder from the codegen backend.
This commit is contained in:
@@ -370,12 +370,12 @@ impl CodegenBackend for LlvmCodegenBackend {
|
||||
codegen_results: CodegenResults,
|
||||
outputs: &OutputFilenames,
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
use crate::back::archive::LlvmArchiveBuilder;
|
||||
use crate::back::archive::LlvmArchiveBuilderBuilder;
|
||||
use rustc_codegen_ssa::back::link::link_binary;
|
||||
|
||||
// Run the linker on any artifacts that resulted from the LLVM run.
|
||||
// This should produce either a finished executable or library.
|
||||
link_binary::<LlvmArchiveBuilder<'_>>(sess, &codegen_results, outputs)
|
||||
link_binary(sess, &LlvmArchiveBuilderBuilder, &codegen_results, outputs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user