Browse Source

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

gingerBill 3 years ago
parent
commit
3f59c45740
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/llvm_backend.cpp

+ 1 - 6
src/llvm_backend.cpp

@@ -1572,6 +1572,7 @@ void lb_generate_code(lbGenerator *gen) {
 
 
 	TIME_SECTION("LLVM Runtime Startup Creation (Global Variables)");
 	TIME_SECTION("LLVM Runtime Startup Creation (Global Variables)");
 	lbProcedure *startup_runtime = lb_create_startup_runtime(default_module, startup_type_info, 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");
 	TIME_SECTION("LLVM Global Procedures and Types");
 	for_array(i, info->entities) {
 	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) {
 	for_array(j, gen->modules.entries) {
 		lbModule *m = gen->modules.entries[j].value;
 		lbModule *m = gen->modules.entries[j].value;
 		for_array(i, m->missing_procedures_to_check) {
 		for_array(i, m->missing_procedures_to_check) {