about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-04 11:59:21 +0000
committerbors <bors@rust-lang.org>2025-09-04 11:59:21 +0000
commit71289c378d0a406a4f537fe4001282d19362931f (patch)
tree9f0b64c64e5aaa7eddad17c8afb5d5853ccb5369 /compiler/rustc_codegen_gcc/src
parent45b9d13b455f820c12760e0fbf6ce69110a3aeda (diff)
parent319fe230f0d960b343be31a1182dc0f10753156c (diff)
downloadrust-71289c378d0a406a4f537fe4001282d19362931f.tar.gz
rust-71289c378d0a406a4f537fe4001282d19362931f.zip
Auto merge of #145955 - bjorn3:lto_refactors4, r=nnethercote
Rework how the codegen coordinator code handles the allocator shim

Continuing from https://github.com/rust-lang/rust/pull/144503 this centralizes most handling of the allocator shim to a single 4 line block in the codegen coordinator. The allocator shim is small enough that making it go through the main codegen loop and spawning a worker thread for it is wasted effort.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
-rw-r--r--compiler/rustc_codegen_gcc/src/back/lto.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/back/lto.rs b/compiler/rustc_codegen_gcc/src/back/lto.rs
index fcee6b6df62..9d8ce2383f2 100644
--- a/compiler/rustc_codegen_gcc/src/back/lto.rs
+++ b/compiler/rustc_codegen_gcc/src/back/lto.rs
@@ -204,7 +204,7 @@ fn fat_lto(
             let path = tmp_path.path().to_path_buf().join(&module.name);
             let path = path.to_str().expect("path");
             let context = &module.module_llvm.context;
-            let config = cgcx.config(module.kind);
+            let config = &cgcx.module_config;
             // NOTE: we need to set the optimization level here in order for LTO to do its job.
             context.set_optimization_level(to_gcc_opt_level(config.opt_level));
             context.add_command_line_option("-flto=auto");