1
Fork 0

Save pre-link bitcode to ModuleCodegen

This commit is contained in:
DianQK 2025-02-06 22:00:19 +08:00
parent 9431427cc3
commit da50297a6e
No known key found for this signature in database
7 changed files with 33 additions and 22 deletions

View file

@ -393,7 +393,7 @@ impl WriteBackendMethods for GccCodegenBackend {
unsafe fn optimize(
_cgcx: &CodegenContext<Self>,
_dcx: DiagCtxtHandle<'_>,
module: &ModuleCodegen<Self::Module>,
module: &mut ModuleCodegen<Self::Module>,
config: &ModuleConfig,
) -> Result<(), FatalError> {
module.module_llvm.context.set_optimization_level(to_gcc_opt_level(config.opt_level));