diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-06 16:06:10 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-21 07:58:44 +0000 |
| commit | 1a6f941d2b1e9f9987518961d3bc49e2691aab2e (patch) | |
| tree | 5e21f9dba5177b2a5a9b0e8dec91edf5ac18b628 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 6e757354ada32657886a9ec944c389cb93b9c919 (diff) | |
| download | rust-1a6f941d2b1e9f9987518961d3bc49e2691aab2e.tar.gz rust-1a6f941d2b1e9f9987518961d3bc49e2691aab2e.zip | |
Move exported_symbols_for_lto out of CodegenContext
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 5747e87e077..44c1608dca0 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -176,10 +176,11 @@ impl WriteBackendMethods for LlvmCodegenBackend { } fn run_and_optimize_fat_lto( cgcx: &CodegenContext<Self>, + exported_symbols_for_lto: &[String], modules: Vec<FatLtoInput<Self>>, diff_fncs: Vec<AutoDiffItem>, ) -> Result<ModuleCodegen<Self::Module>, FatalError> { - let mut module = back::lto::run_fat(cgcx, modules)?; + let mut module = back::lto::run_fat(cgcx, exported_symbols_for_lto, modules)?; if !diff_fncs.is_empty() { builder::autodiff::differentiate(&module, cgcx, diff_fncs)?; @@ -193,10 +194,11 @@ impl WriteBackendMethods for LlvmCodegenBackend { } fn run_thin_lto( cgcx: &CodegenContext<Self>, + exported_symbols_for_lto: &[String], modules: Vec<(String, Self::ThinBuffer)>, cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>, ) -> Result<(Vec<ThinModule<Self>>, Vec<WorkProduct>), FatalError> { - back::lto::run_thin(cgcx, modules, cached_modules) + back::lto::run_thin(cgcx, exported_symbols_for_lto, modules, cached_modules) } fn optimize( cgcx: &CodegenContext<Self>, |
