title: Xcode doesn't create swiftmodule
body: <p>I've spent the past few months converting a project of mine with about 1500 source code files into Swift. It was incredibly tedious, but I finally did it. It runs well, builds well, but:</p>
  
  <p>When I attempt to archive the project, Xcode fails with the following error:</p>
  
  <pre><code>ditto: can't get real path for source '/Users/USER/Library/Developer/Xcode/DerivedData/
  APP-dtsbrzschafjiubelceuxtfwstqf/Build/Intermediates/ArchiveIntermediates/APPCore/
  IntermediateBuildFilesPath/APPCore.build/Release/APPCore.build/Objects-normal/
  x86_64/APPCore.swiftmodule''
  
  Command /usr/bin/ditto failed with exit code 1
  </code></pre>
  
  <p><code>APP</code> being the app and <code>APPCore</code> being the embedded framework.</p>
  
  <p>What I've tried:</p>
  
  <ul>
  <li>cleaning the project (which really has no effect when archiving, since archive always compiles from scratch)</li>
  <li>using Xcode 7.2 beta (released a few days ago)</li>
  <li>making as many declarations as possible non-public</li>
  <li>disabling any Swift optimizations for the release build configuration</li>
  <li>building the <code>APPCore</code> framework as release - which actually works (!) - and does (!) create the <code>.swiftmodule</code> file</li>
  </ul>
  
  <p>The last part being the strangest here. This evidently points to the archive doing something slightly different, but I have no idea what.</p>
  
  <p>My question is if anyone has any idea why is this happening and how to debug this. I've spent the last two days trying to figure this out, but no results...</p>
  
  <p>I've googled this error as well, but unfortunately, the answers were fairly limited and suggesting to comment all lines of code and then start slowly uncommenting them until the project builds. Which is OK for a smaller project, but not for a 25KLOC project, mainly when you have absolutely no idea where to start...</p>