title: iOS library to BitCode
body: <p>I recently downloaded Xcode 7 beta, and Xcode complains about some of my C libraries not being compiled into BitCode. How would I go about telling Clang to produce BitCode that is compatible with iOS? I've seen similar answers on stackoverflow, but I don't know if they apply to producing BitCode libraries for iOS.</p>
  <p>Edit:</p>
  <p>I am using the correct setting, -fembed-bitcode, but when I try to archive, I get the error:
  ld: warning: ignoring file XXXX/XXXX, file was built for archive which is not the architecture being linked (arm64).
  When I use -fembed-bitcode-marker, I can archive, but I get the error:
  full bitcode bundle could not be generated because XX/XX was built only with bitcode marker. The library must be generated from Xcode archive build with bitcode enabled.</p>
  <p>Any ideas on what is going wrong? The library is compiling successfully, but it doesn't let me archive. I created a simple add function and made it into a library, and I get the same symptoms, so it is not the library I'm compiling.</p>
  <p>Edit 2:
  You must build both the arm64 and armv7 versions using bitcode and lipo them together. Using bitcode doesn't take away the need for a fat library when archiving. source : <a href="https://developer.apple.com/forums/thread/9351?answerId=25132022#25132022" rel="noreferrer">Link</a></p>