Add -Z combine_cgu flag

Introduce a compiler option to let rustc combines all regular CGUs into
a single one at the end of compilation.

Part of Issue #64191
This commit is contained in:
Victor Ding
2020-09-09 14:51:16 +10:00
parent e82584a77d
commit c81b43d8ac
6 changed files with 90 additions and 15 deletions

View File

@@ -130,6 +130,13 @@ impl WriteBackendMethods for LlvmCodegenBackend {
llvm::LLVMRustPrintPassTimings();
}
}
fn run_link(
cgcx: &CodegenContext<Self>,
diag_handler: &Handler,
modules: Vec<ModuleCodegen<Self::Module>>,
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
back::write::link(cgcx, diag_handler, modules)
}
fn run_fat_lto(
cgcx: &CodegenContext<Self>,
modules: Vec<FatLTOInput<Self>>,