diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-09-05 19:09:39 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-09-06 13:31:41 +0000 |
| commit | 2cf94b92ca852924ad90943a0c469f01742216a6 (patch) | |
| tree | 4cc4314f0825c819192c4032bfda0617ac1486f2 /compiler/rustc_codegen_ssa/src | |
| parent | 9239d141dc4e9435b036d34cf8b2cb1e37b9f454 (diff) | |
| download | rust-2cf94b92ca852924ad90943a0c469f01742216a6.tar.gz rust-2cf94b92ca852924ad90943a0c469f01742216a6.zip | |
Ensure fat LTO doesn't merge everything into the allocator module
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/lib.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index afda7226fdd..95e02a7c6db 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -490,7 +490,7 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir( let _timer = sess.timer("copy_all_cgu_workproducts_to_incr_comp_cache_dir"); - for module in &compiled_modules.modules { + for module in compiled_modules.modules.iter().filter(|m| m.kind == ModuleKind::Regular) { let mut files = Vec::new(); if let Some(object_file_path) = &module.object { files.push((OutputType::Object.extension(), object_file_path.as_path())); @@ -960,6 +960,7 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>( WorkItemResult::Finished(CompiledModule { links_from_incr_cache, + kind: ModuleKind::Regular, name: module.name, object, dwarf_object, diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index 23146661f27..baba8f9ca3e 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -120,6 +120,7 @@ impl<M> ModuleCodegen<M> { CompiledModule { name: self.name, + kind: self.kind, object, dwarf_object, bytecode, @@ -133,6 +134,7 @@ impl<M> ModuleCodegen<M> { #[derive(Debug, Encodable, Decodable)] pub struct CompiledModule { pub name: String, + pub kind: ModuleKind, pub object: Option<PathBuf>, pub dwarf_object: Option<PathBuf>, pub bytecode: Option<PathBuf>, |
