Skip to content

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

Open
windowsair wants to merge 1 commit intojprendes:masterfrom
windowsair:llvm-box
Open

llvm-box: change the argv taken by llvm-box main entry#28
windowsair wants to merge 1 commit intojprendes:masterfrom
windowsair:llvm-box

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