I found that when building a swift project with the Release config, if there are spaces in any folder names then errors are thrown during the linking process.
As you can see above, the errors are printed across multiple lines. It thinks the files are:
The folder names with spaces are "PDF Contexts" and "View Contexts"
This didn't happen on Swift 4.1.