Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7399

Cannot build in WMO with many/long source file paths

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
    • Environment:

      Xcode 9.3 (9E145)

      Description

      When building with WMO enabled (and 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.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Christopher Christopher Rogers
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: