Some great work has been done on this recently by @dabelknap. Soon swiftc
should support passing parameters via response files (i.e., swiftc @foo.txt
where foo.txt
contains the arguments) just as clang
and many other compilers do. Then it'll be up to Xcode to adopt that support to write arguments out to a response file when necessary.
PRs are here: apple/swift#15853 (already merged), apple/swift#16362 (under review).