Allow custom main when -no-entry-point is set

This commit is contained in:
Feoramund
2024-06-18 01:47:51 -04:00
parent f280ba8511
commit 0196cc46e3

View File

@@ -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 (pt->param_count != 0 ||
pt->result_count != 0) {