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

llvm-box: change the argv taken by llvm-box main entry #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

windowsair
Copy link
Contributor

#27

It looks like llvm-box currently takes the first argument, argv[0], as the command. I'm not sure if this is intentional or if it's just a bug. In most environments, we would probably use it this way:

llvm-box clang main.cpp

In this case, argv[1] is clang, which is the command we really want. For most operating systems, as well as emscripten's callMain method, llvm-box is automatically added as argv[0]. So I'm not sure if the way it's currently written is intentional or not? It looks like we have to explicitly call the _main function and construct a sequence of arguments like this clang main.cpp

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

Successfully merging this pull request may close these issues.

1 participant