17
votes

I have a project I'm building with swift and Xcode 6 Beta 4. Trying to do a release build archive. When I build with release configuration I get the following error:

<unknown>:0: error: unimplemented IR generation feature bitcast between types of different size

Any clues on this? Seems to only happen when Selecting Product > Archive on the same scheme building cmd-B causes no issues and it builds successfully. I'm also able to Run the project in the ios simulator and on device with debug configurations.

1

1 Answers

36
votes

"Unimplemented IR generation feature" sounds like it's running into something in the compiler that hasn't been written yet. Seems to be an issue with the -Ofast setting for the Swift compiler; change your Release setting of Swift Compiler - Code Generation > Optimization Level to "None [-Onone]".

enter image description here