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
[SR-8671] ARG_MAX limit exceeded when compiles huge project #5341
Comments
Comment by Anton Pogonets (JIRA) Sample attached |
We did the compiler work to support this last year, but I don't think the package manager changes made it in. @aciidb0mb3r, you have a dup for this, right? |
Comment by Anton Pogonets (JIRA) @belkadan sounds cool. Is compiler use such syntax when forward invocations to linker? |
Jordan: Nope, we were tracking using response file to pass the list of object files (which landed recently). |
@swift-ci create |
Comment by Anton Pogonets (JIRA) @aciidb0mb3r So as I understand it is already fixed for linking when module with dependencies have too many object files. But not for single module when compiling sources. Is it correct? Are you plan to fix second case? |
Pogonets (JIRA User): Right and yep, we're tracking the second case with this bug report. |
Comment by Anton Pogonets (JIRA) Cool thanks |
Attachment: Download
Additional Detail from JIRA
md5: 7fd3bd1478f560273a7837164b9d76a9
Issue Description:
macOS have a relative small ARG_MAX limit (256kb)
When you compile huge project with SwiftPM they pass all sources one by one as arguments. Each file is passed as absolute path. And with count of files ~1000 (800 in our case) command line args become too long to even start command.
Error message is meaningless by the way
This issue even easier to reach when linking multiple swift modules to single dynamic library (all object files from all modules passed to compiler as single line).
This is pretty common issue for build tools and usually solved with response files. Response files supported by clang, ld.gold and many other tools.
The text was updated successfully, but these errors were encountered: