[SR-7399] Cannot build with many/long source file paths #49942
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
legacy driver
Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Environment
Xcode 9.3 (9E145), Xcode 10 beta 4 (10L213o)
Additional Detail from JIRA
md5: f4155e0d0aaa049357eeb67e9f969e03
relates to:
Issue Description:
When building with lots of Swift files, you can wind up making the arguments to the Swift compiler go over ARGMAX/kern.argmax and cause posix_spawn() to fail. ("error: unable to spawn process (Argument list too long)")
This may seem kinda silly to report but we've actually have had to investigate and workaround this before in our CI environment. We worked around it by shortening the base directory name we were building from. Now it's starting to pop up again with certain jobs (directories) that have a slightly longer name. Eventually we may have too many Swift files to workaround this. At the moment, we have 2,317 Swift files in our main target.
This occurs with both the new and current build systems but I was able to find this error message with the new build system. (It may have just been hidden somewhere with the current one.)
The text was updated successfully, but these errors were encountered: