I am facing the above issue with New Mac M1 with Xcode 13.1.
I am running fastlane and getting this error
** TEST BUILD FAILED ** [21:03:58]: ▸ The following build commands failed: [21:03:58]: ▸ MergeSwiftModule normal x86_64 [21:03:58]: ▸ CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler [21:03:58]: ▸ (2 failures)
❌ error: merge-module command failed with exit code 1 (use -v to see invocation)