Add runtime._cleanup_runtime internal call

This commit is contained in:
gingerBill
2021-10-18 12:28:46 +01:00
parent e98e62ec13
commit 7aac8df2f2
3 changed files with 11 additions and 3 deletions

View File

@@ -879,7 +879,10 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime)
}
}
lbValue cleanup_runtime_value = lb_find_runtime_value(m, str_lit("_cleanup_runtime"));
lb_emit_call(p, cleanup_runtime_value, {}, ProcInlining_none, false);
if (is_dll_main) {
LLVMBuildRet(p->builder, LLVMConstInt(lb_type(m, t_i32), 1, false));