MergeSwiftModule failed with a nonzero exit code

I have a fairly large project which is failing to build with the Xcode 12 beta :confused:

The build error is as follows:

:0: error: circular reference
:0: note: through reference here
:0: note: through reference here
:0: note: through reference here
:0: error: circular reference
:0: note: through reference here
:0: note: through reference here
:0: note: through reference here
:0: error: circular reference
:0: note: through reference here
:0: note: through reference here
:0: note: through reference here

Command MergeSwiftModule failed with a nonzero exit code

Other possibly relevant details:

  • It is cross-platform, all of the targets (iOS, tvOS, macOS) fail to build in the same way.
  • There is an obj-c bridging header.
  • There are no 3rd party dependencies.

So my question is, how might I be able to work around this?
Even a general strategy for dealing with this sort of issue would be helpful!

Hey Syre,

I was having the same issue and I was able to get myself unblocked by changing the Compilation Mode in Build Settings from singlefile to wholemodule.

This definitely isn't a long-term solution, but this at least got me building with Xcode 12.0 beta (12A6159). Hope this helps you or someone else having this issue for now!

1 Like

Hey there,

That has also got me building for now, thanks for the suggestion!
I'm going to file a bug report, hopefully this can get resolved during the betas.

1 Like

Update: Just circling back to this, seems like the issue is resolved in beta 5.

Terms of Service

Privacy Policy

Cookie Policy