Explorar o código

Merge pull request #3778 from Feoramund/fix-2824

Allow custom `main` when `-no-entry-point` is set
gingerBill hai 1 ano
pai
achega
e8c17ac356
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/check_decl.cpp

+ 1 - 1
src/check_decl.cpp

@@ -1077,7 +1077,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
 	}
 	}
 
 
 
 
-	if (e->pkg != nullptr && e->token.string == "main") {
+	if (e->pkg != nullptr && e->token.string == "main" && !build_context.no_entry_point) {
 		if (e->pkg->kind != Package_Runtime) {
 		if (e->pkg->kind != Package_Runtime) {
 			if (pt->param_count != 0 ||
 			if (pt->param_count != 0 ||
 			    pt->result_count != 0) {
 			    pt->result_count != 0) {