2

When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.

<unknown>:0: error: if any output files are specified, they all must be Command CompileSwift failed with a nonzero exit code

I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.

Does anyone know how this error is actually triggered, or what I can do to fix it?

2
  • This appears to go away when I set the "Always embed swift standard libraries" flag to NO in my project settings. This isn't really a solution, and I don't understand the mechanisms at play here. Commented Sep 18, 2018 at 16:57
  • None of the workarounds are helping for our project. This is really a showstopper, we can not archive our app at all. (normal builds using Xcode works fine, but not archiving)... Any other ideas? Commented Sep 25, 2018 at 5:48

1 Answer 1

9

Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.

The solution for us was to set Compilation Mode to Incremental instead of Whole Module.

enter image description here

This means, you have to ignore the Validate Project Settings warning: enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Good call. This saved me half a day at least ;)
Thanks. This fix also fixed the 'error: duplicate input file' problem. Can somebody explain what the reasons are behind this spell?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.