Remove main creation in llvm_backend.cpp and have it done purely in the runtime package (partial bootstrapping)

This commit is contained in:
gingerBill
2022-01-15 17:42:10 +00:00
parent 29ebe0c3c9
commit 3f59c45740

View File

@@ -1572,6 +1572,7 @@ void lb_generate_code(lbGenerator *gen) {
TIME_SECTION("LLVM Runtime Startup Creation (Global Variables)");
lbProcedure *startup_runtime = lb_create_startup_runtime(default_module, startup_type_info, global_variables);
gb_unused(startup_runtime);
TIME_SECTION("LLVM Global Procedures and Types");
for_array(i, info->entities) {
@@ -1640,12 +1641,6 @@ void lb_generate_code(lbGenerator *gen) {
}
}
if (!already_has_entry_point) {
TIME_SECTION("LLVM main");
lb_create_main_procedure(default_module, startup_runtime);
}
for_array(j, gen->modules.entries) {
lbModule *m = gen->modules.entries[j].value;
for_array(i, m->missing_procedures_to_check) {