about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/lib.rs
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-09-09 15:05:43 -0700
committerGitHub <noreply@github.com>2020-09-09 15:05:43 -0700
commit07dbe49ce9239c5caefe8556566cab0b36c60faf (patch)
tree031290f9b26e20a4fe2e466195414111f18ac0ff /compiler/rustc_codegen_llvm/src/lib.rs
parente2be5f568d1f60365b825530f5b5cb722460591b (diff)
parentc81b43d8ac0dd68a49c4c65771c3c65a4ca61f93 (diff)
Rollup merge of #75094 - 0dvictor:cgu, r=oli-obk
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index 67d4b2642c0..2e2abe9fb30 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -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>>,