cucapra / cucapra/braid

Main function in LLVM should either take argv/argc arguments or not exist at all

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Currently, the `main` function in generated LLVM programs takes no "normal" arguments and an environment structure pointer. However, the main function for executable programs should instead take the traditional C argc/argv arguments so it can be invoked. (As an additional optimization, we could even imagine disabling the environment pointer argument completely when a function has no free variables—and `main` is guaranteed to be closed.)

On the other hand, when we just want to link the generated code into a larger program, perhaps it would be nice to have an option to disable the main function altogether.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.