aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-18 01:47:51 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-18 01:49:55 -0400
commit0196cc46e35eb0074ffd5f8dd24cdf8c42fde9e0 (patch)
tree7659320537f103b3db4bbc0fc73ed61d4ae98f82 /src
parentf280ba8511b97bb1d2f5173933a6179c2aba231b (diff)
Allow custom `main` when `-no-entry-point` is set
Diffstat (limited to 'src')
-rw-r--r--src/check_decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 02445cbc6..818556951 100644
--- a/src/check_decl.cpp
+++ b/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 (pt->param_count != 0 ||
pt->result_count != 0) {