title: Xcode 11.5 (11E608c) - Swift 5.2.4 illegal instruction: 4
body: <p>I'm having a problem archiving my Swift code via Xcode.  I keep getting "Error. Illegal Instruction: 4"</p>
  
  <p>Edit: Quick clarification - it builds and runs fine in debug for my device.  It will not build for release (archive)</p>
  
  <p>My first error was in one of my dependencies I built via Carthage.  Tried to update all dependencies via carthage and they're all doing the same thing - "Error. Illegal Instruction: 4"</p>
  
  <p>Here's the error from one on my dependencies I manually build and add in:</p>
  
  <pre><code>1.  Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
  0  swift                    0x00000001133084ea PrintStackTraceSignalHandler(void*) + 42
  1  swift                    0x0000000113307cc0 SignalHandler(int) + 352
  2  libsystem_platform.dylib 0x00007fff7299e5fd _sigtramp + 29
  3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2372278816
  4  swift                    0x000000010f0507d7 swift::performFrontend(llvm::ArrayRef&lt;char const*&gt;, char const*, void*, swift::FrontendObserver*) + 9799
  5  swift                    0x000000010efd1b73 main + 1283
  6  libdyld.dylib            0x00007fff727a5cc9 start + 1
  error: Illegal instruction: 4 (in target 'libsignal-protocol-swift iOS' from project 'libsignal-protocol-swift')
  </code></pre>
  
  <p>Here's another one from a different dependency built via carthage:</p>
  
  <pre><code>139 1.      Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
  140 0  swift                    0x00000001070674ea PrintStackTraceSignalHandler(void*) + 42
  141 1  swift                    0x0000000107066cc0 SignalHandler(int) + 352
  142 2  libsystem_platform.dylib 0x00007fff7299e5fd _sigtramp + 29
  143 3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2372278816
  144 4  swift                    0x0000000102daf7d7 swift::performFrontend(llvm::ArrayRef&lt;char const*&gt;, char const*, void    *, swift::FrontendObserver*) + 9799
  145 5  swift                    0x0000000102d30b73 main + 1283
  146 6  libdyld.dylib            0x00007fff727a5cc9 start + 1
  147 error: Illegal instruction: 4 (in target 'DynamicButton' from project 'DynamicButtonExample')
  </code></pre>
  
  <p>Here's it again from xcode trying to build my code:</p>
  
  <pre><code>1.  Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
  0  swift                    0x000000010aeaf4ea PrintStackTraceSignalHandler(void*) + 42
  1  swift                    0x000000010aeaecc0 SignalHandler(int) + 352
  2  libsystem_platform.dylib 0x00007fff7299e5fd _sigtramp + 29
  3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2372278816
  4  swift                    0x0000000106bf77d7 swift::performFrontend(llvm::ArrayRef&lt;char const*&gt;, char const*, void*, swift::FrontendObserver*) + 9799
  5  swift                    0x0000000106b78b73 main + 1283
  6  libdyld.dylib            0x00007fff727a5cc9 start + 1
  error: Illegal instruction: 4 (in target 'Assistant' from project 'CareApp')
  </code></pre>
  
  <p>I have absolutely no idea what's going on.  I've restarted, cleared DerivedData, cleaned Build Folder, etc.</p>
  
  <p>All the errors are exactly the same whether built via xcode or command line (carthage builds via command line)</p>
  
  <p>I think it's an issue w/ Swift 5.2.4? The last time I successfully archived was 5/26/20.  I'm now running Swift 5.2.4 and according to my computer it was created on 5/27/20.</p>
  
  <p>Edit: I have also tried changing the optimization settings for release to "None" - same result.</p>