diff options
| author | DianQK <dianqk@dianqk.net> | 2025-02-06 21:59:36 +0800 |
|---|---|---|
| committer | DianQK <dianqk@dianqk.net> | 2025-02-23 21:23:38 +0800 |
| commit | 9431427cc363d0a1c36401cb98f15a7426f2220f (patch) | |
| tree | 6cafe2c42e4bc74ccaef638cf398e09cffb556e5 /compiler/rustc_codegen_gcc/src/back | |
| parent | f32ca1afafa6dbe565b7209067f29c8cf9d074c3 (diff) | |
| download | rust-9431427cc363d0a1c36401cb98f15a7426f2220f.tar.gz rust-9431427cc363d0a1c36401cb98f15a7426f2220f.zip | |
Add `new_regular` and `new_allocator` to `ModuleCodegen`
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/back')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/back/lto.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/back/lto.rs b/compiler/rustc_codegen_gcc/src/back/lto.rs index cb4caec8c32..e5221c7da31 100644 --- a/compiler/rustc_codegen_gcc/src/back/lto.rs +++ b/compiler/rustc_codegen_gcc/src/back/lto.rs @@ -632,17 +632,16 @@ pub unsafe fn optimize_thin_module( Arc::new(SyncContext::new(context)) } }; - let module = ModuleCodegen { - module_llvm: GccContext { + let module = ModuleCodegen::new_regular( + thin_module.name().to_string(), + GccContext { context, should_combine_object_files, // TODO(antoyo): use the correct relocation model here. relocation_model: RelocModel::Pic, temp_dir: None, }, - name: thin_module.name().to_string(), - kind: ModuleKind::Regular, - }; + ); /*{ let target = &*module.module_llvm.tm; let llmod = module.module_llvm.llmod(); |
