-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
emcc.bat: command line is too long #4438
Comments
What version is this on? I think we've had improvements since the last stable release. |
Same problem on emscripten versions 1.36.0 and 1.35.0 |
The linked article reads like the issue is not specific to Emscripten uses the first workaround specified in the article, these files are called response files in Emscripten, and the syntax is same as for e.g. MSBuild. That is, when building
one can instead do
to pass the parameters to the compiler. Multiple response files may be used, and regular command line arguments can be mixed with response files, so
would be valid. The contents of the response files are expanded in place to preserve the order. Note that backslashes don't go too well in response files. They need to either be escaped or just use forward slashes. Response files are caller's responsibility, the callee does not delete them when finished. So caller should remember to delete the files after the The cmdline length issue is not specific to Emscripten, for example gcc.exe also has the same issue and uses the same response file workaround as Emscripten does, so using an Can you try using response files to work around the issue? |
I would like to say that using a response file allowed emcc to link against large table of files. Thanks for that workaround. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
Since
emcc.bat
usescmd.exe
, there is a limit for command line length of 8191 characters. More info. This issue makes it a pain to do a drop-in replacement of gcc with emcc in build systems. Some simpleemcc.exe
that does exactly whatemcc.bat
currently does should fix the issue.The text was updated successfully, but these errors were encountered: