Hello, we have a large(17000+ source files in main target + many packages) mixed(Swift+ObjC) project. When we build it on Xcode 12.5.1, everything is ok. When we tried to build it on Xcode 13+, getting compile error "Argument list too long.” We researched and understood that the problem is a buffer(ARG_MAX) overflow when the compiler passes the path to all source files to ARG_MAX.
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver (Argument list too long) Command CompileSwiftSources failed with a nonzero exit code
https://github.com/RenatGafarov/LargeProjectExample - project example with error