Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sampsyo opened this issue May 16, 2017 · 0 comments

Comments

@sampsyo
Copy link
Collaborator

sampsyo commented May 16, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant