diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-08-28 10:26:29 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-09-04 08:21:10 +0000 |
| commit | 319fe230f0d960b343be31a1182dc0f10753156c (patch) | |
| tree | f52a6178641551c257596ea56fc9cedfb6c6ceac /compiler/rustc_codegen_gcc | |
| parent | eea81b5d752f5310fcbd5ddae722afc7de0b8fa1 (diff) | |
| download | rust-319fe230f0d960b343be31a1182dc0f10753156c.tar.gz rust-319fe230f0d960b343be31a1182dc0f10753156c.zip | |
Special case allocator module submission to avoid special casing it elsewhere
A lot of places had special handling just in case they would get an allocator module even though most of these places could never get one or would have a trivial implementation for the allocator module. Moving all handling of the allocator module to a single place simplifies things a fair bit.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/back/lto.rs | 2 |
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"); |
